Read more blog text

Hi there,

i have been trying forever to change the ‘‘read more’’ text that shows underneath blog post, but with no succes.
Can you help me out? i saw other topics where they used this code :

function new_excerpt_more($more)
{
$stack = x_get_stack();

if ( $stack == 'integrity' ) {
  return ' ... <div><a href="' . get_permalink() . '" class="more-link">' . __( 'Read More', '__x__' ) . '</a></div>';
} else if ( $stack == 'renew' ) {
  return ' ... <a href="' . get_permalink() . '" class="more-link">' . __( 'Read More', '__x__' ) . '</a>';
}

}
add_filter(‘excerpt_more’, ‘new_excerpt_more’);

But this didn’t work for me.

Hi @macvink,

Thanks for reaching out.
You can change the Read More text on the blog page. To do so, you just need to add the piece of code at functions.php of your child theme.

function new_excerpt_more($more) 
{
    $stack = x_get_stack();

    if ( $stack == 'integrity' ) {
    return ' ... <div><a href="' . get_permalink() . '" class="more-link">' . __( 'Your Text', '__x__' ) . '</a></div>';
    } else if ( $stack == 'renew' ) {
    return ' ... <a href="' . get_permalink() . '" class="more-link">' . __( 'Your Text', '__x__' ) . '</a>';
    }
}
add_filter('excerpt_more', 'new_excerpt_more');

And you need to change the Your Text to text what you want to show in place of Read More.

Please remember that the above code will work if copied as it is and doesn’t conflict with any existing style.
Please note that the code provided serves only as a guide to help you get started custom coding on your own if there’s no option offered in our theme or the products we bundle.
We really do not provide support for custom codes which means we can’t fix it in case it conflicts with something on your site nor will we enhance it.

Thanks

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.