AdvancedCustomFields / AdvancedCustomFields/acf
ACF Blocks only shows up in Posts
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 945
- Forks
- 197
- PR merge metrics
- No merged PRs in 30d
Description
Ok, so I made some blocks and they're working fine, but ONLY on posts. They don't even appear as an option on my pages.
I've tried adding 'post_types', but nothing changed.
This is the code in my functions.php file:
acf_register_block_type(array(
'name' => 'list-overlap',
'title' => __('Texto com Lista'),
'description' => __('Conteúdo com Lista '),
'render_template' => 'template-parts/blocks/list-overlap/list-overlap.php',
'category' => 'sobremesah',
'icon' => 'format-aside',
'keywords' => array( 'texto'),
'post_types' => array('post', 'page'),
));
I really think that It's something really stupid, but I can't find anything like that on the internet.
WordPress 5.2.2
ACF Pro 5.8.2
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The reported entry point is the acf_register_block_type() call in functions.php, using WordPress 5.2.2 and ACF Pro 5.8.2. Start by checking how the post_types setting is interpreted for blocks on posts versus pages; done means the registered block appears as an option while editing a page.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php, wordpress
- Domain
- content, web-dev
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100