Home › Forums › General Issues › Order Post Objects by menu_order › Reply To: Order Post Objects by menu_order
Hi!
My best guess would be that this:
get_field('child_pages', false, false);
does not work anymore.. since you’re getting the 5 latest blogposts it would suggest that $ids is empty and you’re making a standard get_posts call..
What you’re doing is a bit strange tho.. you’ve got a ACF field which fetches all of the posts you want and you want to extract the ids to make a new query which does the very same thing. The only difference is that you want it ordered by menu_order..
If you’re not afraid to do a little bit of digging a better solution would be to copy the post_object field file from ACF core and make your own field which only outputs ID.. I think I’ve made such changes before but I can’t find them now..
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 Cookie Policy. If you continue to use this site, you consent to our use of cookies.