How to Display a Read More link in WordPress Posts

How to Display a Read More link in WordPress Posts

If you want to avoid the internal duplicate content issue, you need to use post excerpts. This also improves the site load time and make your blog SEO friendly.

This is a mini description of a post which shown on the main page of your blog. You can then add a WordPress read more button in the ending.

However, you can automatically add a read more link HTML to WordPress excerpt. There are two different ways of displaying the read more excerpt. You can use a plugin or a code for this task. In this article, you will learn both ways.

wordpress read more button

Displaying Read More Link With Code

For adding the code, first, go to functions.php file and open it. Now paste the following code inside the PHP tags-

1

2

3

4

5

6

// Changing excerpt more

function new_excerpt_more($more) {

global $post;

return ‘… <a href=”‘. get_permalink($post->ID) . ‘”>’ . ‘Read More &raquo;’ . ‘</a>’;

}

add_filter(‘excerpt_more’, ‘new_excerpt_more’);

 

Code Credit: Source

This code tells the WordPress to remove the default “more” text. This may look like dots. This code will replace that dots with a link. This is a simple process which will not take so much time.

Using Plugins

There are some limitations of using codes for ‘read more’ link in WordPress excerpt. You need to customize the code for a variety of options.

So, you can use a plugin which will provide a variety of options for your blog. Here I am going to share two plugins that you can use on your WordPress blog.

Read More Excerpt Link Plugin

Installation Process: First go here and download the plugin. You can also search it from the Plugins menu of WordPress. Go to add new button from plugins, click it.

Now search for Read More Excerpt Link.  Find the plugin and click install now. It will be installed easily. Now activate the plugin from the settings.

If you want to upload it manually, go to the read-more-excerpt-link folder to the /wp-content/plugins/ directory. Now, upload the plugin. Then activate the plugin from the plugins screen in your WordPress admin section.

This is a lightweight plugin that you can install on your WordPress blog with a few clicks. If you are using the by default option, it will crop the content and then show dots.

This plugin will replace these dots with read more link. However, you can customize the read more text with any other texts. For example, you can add show more, more or any other texts.

WP show more Plugin

Installation Process: This is also a popular plugin for displaying the read more link in WordPress excerption. If you wish to use this plugin, go here.

Now download the plugin. Next, upload the plugin to your WordPress Plugins menu. Then activate the plugin from the settings.

You can then use the shortcode wherever you want. You can use the shortcode in pages, posts, widgets, etc.

This plugin will hide the text which is defined by the shortcode. You can change the link color as you wish. For changing the color, you need to use the attribute [color=“#ffcc00”] in the shortcode.

You can also change the link text to any other texts. For changing the text, Define the «read more» and «read less» text with the attribute [more=“your text”] and [less=“your text”] in the shortcode. You can also change the font size of the link text.

For changing the font size, Set the parameter [size=“120”]. Here 120 means 120%. Replace the integer number according to your preference. This plugin supports all WordPress versions. So, you don’t have to be tense.

I hope you liked this article. You should also read Why You Should Use A CDN For Your WordPress Blog.

Don’t forget to do Fifty – Fifty this article with your friends on Facebook and Twitter. :)

Write a Comment