Read More on Excerpt
-
Is there any way of getting a Read More link to show up on an excerpt? I’ve tried the following code in my functions file…
function new_excerpt_more( $more ) { return ' <a class="read-more" href="'. get_permalink( get_the_ID() ) . '">Read More</a>'; } add_filter( 'excerpt_more', 'new_excerpt_more' );but this only appears when no Excerpt has been added to a post and therefore it’s just taking the first part of the post.
I would like to add an excerpt to each post but then for the Read More link to also show up inline. I also tried this…
function excerpt_read_more_link($output) { global $post; return $output . '<a href="'. get_permalink($post->ID) . '"> Read More...</a>'; } add_filter('the_excerpt', 'excerpt_read_more_link');But that just adds a Read More link to the line after the excerpt and not inline.
Any ideas or help would be much appreciated.
The topic ‘Read More on Excerpt’ is closed to new replies.