When you use the_excerpt() in WordPress, it gives you auto-generated excerpt without shortcodes and tags. It’s default length is 55 words. The excerpt contains a ‘more’ tag at the end which by default is the […]. So in this tutorial I am showing you how to add Read More link in WordPress.
Now open functions.php file of your theme and add following code:
function your_read_more_function( $more ) { return ' …' <a rel="nofollow" class="read-more" href="'. esc_url( get_permalink() ) . '">' . __( 'Read More', 'your-domain' ) . '</a>; } add_filter( 'excerpt_more', 'your_read_more_function' );
By default this link will not appear in new line, so you need to use CSS for “read-more” class.