AdvancedCustomFields / AdvancedCustomFields/acf
Not seeing Gutenberg "blocks" listed in location rules
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 945
- Forks
- 197
- PR merge metrics
- No merged PRs in 30d
Description
I copied the example from https://www.advancedcustomfields.com/resources/acf_register_block_type/ verbatim (code and template file) but I don't see the widget when I create a page.
add_action('acf/init', 'my_acf_blocks_init');
function my_acf_blocks_init() {
// Check function exists.
if( function_exists('acf_register_block_type') ) {
// Register a testimonial block.
acf_register_block_type(array(
'name' => 'testimonial',
'title' => __('Testimonial'),
'description' => __('A custom testimonial block.'),
'render_template' => 'template-parts/blocks/testimonial/testimonial.php',
'category' => 'formatting',
));
}
}
Nor do I see "Blocks" listed when I try to create a custom field.
I'm on Wordpress 5.4.1 and ACF 5.8.9
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
Start with the reported registration snippet and compare its behavior on WordPress 5.4.1 with ACF 5.8.9. Check why the Gutenberg block and the Blocks location rule are absent; the issue is resolved when the testimonial block appears in the editor and Blocks is available when creating a custom field.
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
- Needs clarification
- Newbie friendliness
- 25/100