Home Forums Gutenberg Registering block only for front page


Registering block only for front page

  • 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.


    • pi-web

    • August 14, 2020 at 11:52 pm

    Hi !

    You could maybe use the allowed_block_types filter to allow it only for the frontpage.

    I never tried it in this case though.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.

We use cookies to offer you a better browsing experience, analyze site traffic and personalize content. Read about how we use cookies and how you can control them in our Cookie Policy. If you continue to use this site, you consent to our use of cookies.