Home › Forums › General Issues › More Tag not converting › Reply To: More Tag not converting
Hi @radirot
I’m not sure why it isn’t working, but you can always use acf/load_value and str_replace to change that tags automatically for WYSIWYG custom field. You can use this code to do it:
function my_acf_load_value( $value, $post_id, $field )
{
// run the_content filter on all textarea values
$value = apply_filters('the_content',$value);
$value = str_replace("<!--more-->", '<span id="more-'. $post_id .'"></span>', $value);
return $value;
}
add_filter('acf/load_value/type=wysiwyg', 'my_acf_load_value', 10, 3);
I hope this helps.
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.