Custom read more text not working (3 posts)

  1. devnl
    Posted 4 years ago #


    I'm using the following code in my template:

    <?php the_content('Custom text &raquo;'); ?>

    However, the custom text is not rendering, but it's rendering "Continue reading 'posttitle' »". If I use the_excerpt it does render the correct text, however I need more control by using the More tag. I'm using it in a custom WPQuery loop using the following query:

    $the_query = new WP_Query( 'category_name=featured&posts_per_page=2&paged=1' );

    Anyone have any idea why the text is not rendering? Am I missing something in my template?


  2. devnl
    Posted 4 years ago #

    A full pastebin can be found here:


  3. devnl
    Posted 4 years ago #

    Solved it for now by using the following in functions.php, but this shouldnt be a solution if you ask me...

    function handle_more_link( $link, $link_text ) {
    	return str_replace( $link_text, 'Lees verder &raquo;', $link);
    add_filter( 'the_content_more_link', 'handle_more_link', 10, 2 );

Topic Closed

This topic has been closed to new replies.

About this Topic