12

WordPress: Fun with More Links

Michael Mann
Note: Not all WordPress themes are created equal and this seems to not work in all themes. Some themes implement this in other ways, including use the the_permalink() tag. Removing the block containing this tag and following the directions below seems to allow for the method below to work correctly.

WordPress offers visitors a way to read the entire blog post when excerpts are shown. The "more" link provides visitors with the means to read the rest of a blog post. However, the wording displayed can seem pretty boring or bland. Thankfully there are several way to change the text: all links or individually.

Change All More Links

Two tags are provided by WordPress to show the more link text. The default tag used by most themes is the_content(). The other is the_excerpt(), which allows for a small amount of text to be shown as an excerpt. We will focus on the_content() and show how to modify the "more" link, which will allow for a customized excerpt and "more" link text.

This tag is found in the index.php file under a theme. Open wp-content/themes/{theme_name}/index.php (make sure to substitute {theme_name} for the desired theme name). Find the line where the read more link is located:

the_content('Text in here for the read more link');

Change the_content to use "Read the Entire Entry... instead. This will look like this:

the_content('Read the entire entry...');

Save and re-upload the file.

Change Individual More Link

While the_content is called from the theme, we can change certain posts to use something different in the "more" link. This is accomplished by using the more tag right in the post and customizing the text displayed. For instance, if we want the more test to read "But wait, there's more!", we will edit the post to add this in by doing the following:

Log into the WordPress Control Panel. From the left side navigation, click the downward arrow next to Posts. Click Edit. Select the post you wish to edit, by clicking its name. Click the HTML tab and enter the more tag where desired.

< !--more But wait, there's more! -- >
Once done, click Update.

Both of the more tag options can be in place at the same time. This will allow for customization of the default more link text, while allowing for customization per blog post.

Published by Michael Mann

With over 12 years of professional experience as a Web designer and over 25 years of general computer experience, I am often the resident tech . I own and operate Michael Mann Desktop Publishing, a desktop p...  View profile

To comment, please sign in to your Yahoo! account, or sign up for a new account.