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:
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/2015/news
Share Improve this question edited Oct 2, 2015 at 22:13 fuxia♦ 107k38 gold badges255 silver badges459 bronze badges asked Oct 2, 2015 at 21:20 Ray WilliamsRay Williams 11 gold badge1 silver badge2 bronze badges 1- You'll have great luck referencing the Codex, particularly the Customizing the Read More area. – Greg McMullen Commented Nov 7, 2016 at 2:21
3 Answers
Reset to default 1The 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');
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' );
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 »', 'domain_name' ) .'</a>';
}
add_filter( 'excerpt_more', 'develop_custom_excerpt_more' );