Home › Forums › General Issues › Only list pages with specific value in property in relationship field › Reply To: Only list pages with specific value in property in relationship field
There is a known problem with the relationship field and hierarchical post types. It’s not really considered a bug. When ACF gets the posts in a hierarchical post type it attempts to short them hierarchically.
so in your condition
|-type1
| |--type2
| | |--type3
| |--type2
| |--type2
| |--type2
| | |--type3
|-type2
|-type1
|--type2
the grandparent pages that are “type1” are not returned and when ACF tries to sort them since the grandparents are missing at the top level the sub pages disappear. This is not the case when all of the grandparents are all of the “type1” type because all of the “parent type2” pages are returned.
There isn’t any way that I know of to fix this except to change a core ACF file. I put a fix for another topic here https://support.advancedcustomfields.com/forums/topic/relationship-filter-query-by-page-template/.
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!
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 Privacy Policy. If you continue to use this site, you consent to our use of cookies.