Home › Forums › General Issues › Order by true/false field using WP_Query › Reply To: Order by true/false field using WP_Query
if anyone is searching for a solution to this issue, i had 2000 posts and found a way.
just write a php script that loads wp (outside of wp theme folder).
it should first go through groups of posts if you have to many (say grouping of 50). i did it with a url start stop var ?start=0&stop=100
you can first load the post, take the title into a var
then update the post using wp_update_post and the title from the var
https://codex.wordpress.org/Function_Reference/wp_update_post
it took about 10 mins to update all 2000 after each load and changing the start stop and because i am force saving the post, the acf default values for some fields were generated and saved.
plus this was with wpml translated posts as well, so it was about 3800 as some translations were missing.
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.