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!
📣 “ACF Chat Fridays”
— Advanced Custom Fields (@wp_acf) January 31, 2023
The ACF team holds their first open office hours this Friday! Come and talk ACF, and ask questions about building sites with the plugin.
We’d love to see you there!
📆 Friday 3rd Feb - 3pm UTC
👉 Register here - https://t.co/3UtvQbE4CU pic.twitter.com/oTwW9K1XQ0
© 2023 Advanced Custom Fields.
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 Cookie Policy. If you continue to use this site, you consent to our use of cookies.