Support » Fixing WordPress » Read More link troubles

  • Resolved adejones


    This “read more” function is something I seem to struggle with on every site I do and finally want some clarification.
    In my post I have put a line of text, then <– more –> and then another line of text.
    In the blog page template, I have the_content(); and in my functions.php I have

    function my_more_link($more_link, $more_link_text) {
    	return str_replace($more_link_text, 'Keep reading this post', $more_link);
    add_filter('the_content_more_link', 'my_more_link', 10, 2);

    In theory, this function should insert “Keep reading this post” at the point of my <– more –> right? Well it doesn’t, I still just get the full post.

    Any help please?

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Read More link troubles’ is closed to new replies.