Home › Forums › Feature Requests › New feature for posts with post_parent=0 › Reply To: New feature for posts with post_parent=0
The first part can be done using this filter https://www.advancedcustomfields.com/resources/acf-fields-post_object-query/
The second part requires creating a custom location rule https://www.advancedcustomfields.com/resources/custom-location-rules/. I have some example custom location rules here https://github.com/Hube2/acf-filters-and-functions. There’s not one that is specifically for what you want. If you dig around in ACF and find the page type location rules you can pretty much copy most of what you need from ACF for use with your custom post type. Although, I just dug around in ACF and it seems that the Page Type location rule should work for parent/child no matter what post type you use it on (unless I’m missing something)
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.