0

I am using this code in functions.php to so it will show on the front of my site and show the read more, but the read more is not showing, your help would be appreciated.

 function new_excerpt_more( $more ) {
    return ' <a href="'. get_permalink( get_the_ID() ) . ' '
           . __('<br/><br/> Read More') . '</a>';
    }

    add_filter( 'excerpt_more', 'new_excerpt_more');

Here is my site demo link: http://visionedc.com/2015/news

1

3 Answers 3

1

The excerpt_more filter only handles the linked text - not the link itself.

Try:

function new_excerpt_more( $more ) {
    return '<br/><br/>Read More';
}
add_filter( 'excerpt_more', 'new_excerpt_more');
0

I advises you to use this simple function in your functions.php

function read_more_modif(){
    $readmore = "make your custom text her" ;
    return '<div class="lireSuite"><a href="' . get_permalink() . '">"'.$readmore.'</a></div>'; 
    } 

add_filter( 'the_content_more_link', ' read_more_modif' );
0

Add this in functions.php:

function develop_custom_excerpt_more($more) {
     global $post;
     // edit here if you like
     return '...  <a class="excerpt-read-more" href="'. get_permalink( $post->ID ) . '" title="'. __( 'Read ', 'domain_name' ) . esc_attr( get_the_title( $post->ID ) ).'">'. __( 'Show more &raquo;', 'domain_name' ) .'</a>';
 }
 add_filter( 'excerpt_more', 'develop_custom_excerpt_more' );

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.