How to make some text of "Read More" on wordpress not clickable?

2 replies
hello all.. can I make some text of "read more" not clickable?

For example, let's say my post title is "Best Monitor", and I want the read more text to be:

Continue reading Best Monitor

I can do that using this code:
Code:
<?php the_content("Continue reading " . the_title('<b><i>', '</b></i>', false)); ?>
Now, I need to seperate "Continue reading" to be just text only (not link) and the link only to "Best Monitor".

I've seen a website doing this. How can I do that? Thank you very much.
#clickable #make #read more #text #wordpress
  • Profile picture of the author johnnyN
    you just need to remove the "continue reading" from that line and place it in front of the php

    HTML Code:
    Continue reading <?php the_content(the_title('<b><i>', '</b></i>', false)); ?>
    {{ DiscussionBoard.errors[4580167].message }}
  • Profile picture of the author bhuthecoder
    you need to add below code in your theme functions.php

    PHP Code:
    function new_content_more() {
           global ;
        return 
    'Continue Reading <a href="'get_permalink() . '">'.get_the_title().'</a>';
    }
    add_filter('the_content_more_link''new_excerpt_more'); 
    PHP Code:
    function new_excerpt_more() {
           global ;
        return 
    'Continue Reading <a href="'get_permalink() . '">'.get_the_title().'</a>';
    }
    add_filter('excerpt_more''new_excerpt_more'); 
    note: editor removing variables from my code ,unable to post code correctly
    {{ DiscussionBoard.errors[4580366].message }}

Trending Topics