Home › Forums › General Issues › Migrate a custom field content to the_content › Reply To: Migrate a custom field content to the_content
To bulk update this value, I would create a new page template where you can write and run some custom code.
This template would use the WP_Query / get_posts function to query the DB for all the posts you want to update.
Then, loop through all the posts and for each post, load the ACF value (get_field()), and then use the wp_update_post function to set the post_content with the ACF value.
Hope that helps.
Thanks
E
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.