Home Forums General Issues "Read more" in ACF text or wysiwyg field Reply To: "Read more" in ACF text or wysiwyg field

  • Actually, I managed to solve this problem in another way. I post here the solution in case somebody else is interested in the answer:

    1) I created a Wysiwyg Editor field.
    2) Added the field normally in my php file.
    3) In the post editor, I used the normal wordpress “more” tag, which automatically inserts the shortcode <!–more–> inside my content and creates two paragraphs automatically, one before and one after the shortcode.
    4) In my Jquery file, I wrote this code:

           $('p').html(function(_, text) {
            return text.replace('<!--more-->', '<a href="#" class="read_more">read more</a>' );

    That’s it, basically. With that link and that class I can manipulate the link as I want.