Home › Forums › General Issues › Can't get Excerpts to work › Reply To: Can't get Excerpts to work
I solved, I have found and tried this and works:
This should work for you. Make the field name ‘the_content’. I am wrapping this up into a plugin and will also include the_excerpt, and featured_image.
paste this in functions.php:
function hg_acf_save_content( $value, $post_id, $field )
{
wp_update_post( array( ‘ID’ => $post_id, ‘post_content’ => $value ) );
return $value;
}
add_filter(‘acf/update_value/name=the_content’, ‘hg_acf_save_content’, 10, 3);
the only important thing is to name your desired field as:
the_content
and works!
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’re excited to announce we've released Composer support for installing ACF PRO.
— Advanced Custom Fields (@wp_acf) January 31, 2023
🎉 #ComposerPHP fans rejoice!
✨ Please see the release post for all the details and full instructions. https://t.co/ebEfp61nlR
© 2023 Advanced Custom Fields.
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.