Open wearebattalion opened 3 years ago
I haven't used blocks, nor have I tried to use ACF with blocks, so my knowledge on the requirements of getting them working is very small.
Where is the block itself getting defined, when I search ACF's docs, there is a function called acf_register_block_type
, and in that you can pass the post types which it should be available to:
https://www.advancedcustomfields.com/resources/acf_register_block_type/#parameters
Just going to leave this here, but we have a lightweight "framework" that works seamlessly with ACF Builder and ACF Blocks, in case anybody wants to use it OR pick it apart for their own use! 👍🏻 It will auto register blocks that are located within a certain folder, and has built in template toggles for determining which post types the block will be available on.
I've created a number of ACF groups (example below) as gutenberg blocks which I need to use across pages and posts, however the blocks are only available in pages and not posts, and they don't even appear when I search for them.
I've included an example of an ACF group I've created as a block below:
functions.php
Just to confirm, I need this block to be available on posts as well as pages.