Home › Forums › ACF PRO › Flexible content layouts not showing up in duplicated post › Reply To: Flexible content layouts not showing up in duplicated post
I solved my problem by adding the following line in the variable declaration block of the duplicate post function.
$flexible_content = get_field('YOUR_FLEXIBLE_CONTENT_FIELD', $post_id, false);
And then the following lines in the if ($post)
condition block.
if ($flexible_content) {
update_field('YOUR_FLEXIBLE_CONTENT_FIELD', $flexible_content, $new_post_id);
}
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.