How to add the “Read More” link to the WordPress post
Sometimes it happens when you find a theme that you like yet after trying it out you find that the WordPress excerpt length that is displayed just isn't working for you. Whether it be too short or too long, it just needs to be changed! Fortunately, it is quite easy to modify the excerpt length in WordPress even if you don’t know anything about PHP.
Check out:
After setting excerpt length up you would also like to add a "Read More" link to your post so today I will show you how add a read more link to the WordPress post.
Step 1:
Login to your WordPress Site:
- Now click Editor after navigating to Appearance section in the Sidebar and
- Select the Theme Functions or "functions.php" template file from right sidebar
- Now add the following code just before ?> tag:
function new_excerpt_more($more) {
global $post;
return 'Read the Rest...';
}
add_filter('excerpt_more', 'new_excerpt_more');
Remember to place it just above the last line of the code ?> or your functions.php file may become unusable.
If you don't find ?> tag then place it in the last of functions.php file.
Step 2:
Change the Read the Rest... and use text to specify the words you want to display for Read More link.
Step 3:
Update the file and go view your site.
It's a clever idea to back up your themes functions.php file before editing it, in case of any error restore the functions.php to the previous one.