Still broken in 5.0.9; fix above still works. Sorry :/
Okay, figured it out.
The error is in acf_get_posts() and the $offset variable:
$offset = 0;
// ...
// loop over posts and find $i
foreach( $all_posts as $offset => $p ) {
if( $p->ID == $match_id ) {
break;
}
}
// order posts
$all_posts = get_page_children( 0, $all_posts );
for( $i = $offset; $i < ($offset + $length); $i++ ) {
$offset is used in the foreach loop, which then breaks it when trying to do the for loop at the end. Changing $offset => $p
to $postOffset => $p
, or even just => $p
, solves the issue.
Actually, following http://support.advancedcustomfields.com/forums/topic/5-0-7-pro-pagesposts-not-showing-in-rules/, it does seem to be related to Post Types Order. When I deactivate that plugin, it works fine.
I’m seeing the same thing as well.
Still broken in 5.0.8. Fix above still works. :/
This one might be related to http://support.advancedcustomfields.com/forums/topic/5-0-5-apply-group-rule-to-specific-page/.
Edit: yes, they’re the same thing.
Also still broken in 5.0.7. The fix as listed above still works.
FYI, this is still broken in 5.0.6.
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.