Hi there ACF community. I was wondering if anyone knew of a way to register a custom block that is only available to use on the assigned front page.
I know acf_register_block_type()
has an argument for post types, but was wondering if there was a way make a block only available on one specific page? In my case, it’s the home page (front page), but if it has to be by page ID, that would work too.
Any help would be greatly appreciated.
Thanks!
Hi !
You could maybe use the allowed_block_types filter to allow it only for the frontpage.
https://developer.wordpress.org/reference/hooks/allowed_block_types/
I never tried it in this case though.