Skip to content

Instantly share code, notes, and snippets.

@jesgs
Last active August 29, 2015 14:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jesgs/5716fc14817876b594b3 to your computer and use it in GitHub Desktop.
Save jesgs/5716fc14817876b594b3 to your computer and use it in GitHub Desktop.
Fix for post_parent field sorting problem in ACF5 Pro. Untested so use at your own risk!
<?php
// line 1689 advanced-custom-fields-pro/api/api-helpers.php
// Replace line 1689 with these two lines of code:
$page_parent_id = isset($args['post_parent']) ? $args['post_parent'] : 0;
$all_posts = get_page_children( $page_parent_id, $all_posts );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment