AdvancedCustomFields / AdvancedCustomFields/acf
Field group location rules: 'block is equal to' not working with 'post type is equal to'
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 945
- Forks
- 197
- PR merge metrics
- No merged PRs in 30d
Description
I created a field group with options for a block and wanted to show those fields only when my block is inserted in a page.
When I create a rule set with 'block' AND 'post type' the fields won't show up in all post types for that block.
I also tried it with 'is not equal to' and got the same result. Of course it works perfectly if the rules are only applied to the block.
- Wordpress 5.9.1
- ACF 5.12
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
Reproduce the field-group location rules with ACF 5.12 and WordPress 5.9.1 using a block combined with the post-type conditions described, including both equal and not-equal operators. Trace the location-rule evaluation entry point and verify that the fields appear for the expected post types when the conditions are combined.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100