Fixing the Read More Tag Issue on Static WordPress Pages

In WordPress, there are two ways to display excerpts in a blog. The first is to use the the excerpt() tag in your themes, and the second is to use the more tag.

more tags

While writing a post, the more tag allows you to designate where the cut off point is in the article, making it easier for the editor and allowing you to show teaser content and other things. The more tag, on the other hand, is only used on the home page, which displays the most recent posts. Pages does not support it. We recently ran into this problem and were able to solve it due to the WordPress forums. Use the following code inside the loop to turn on the read tags in pages for presenting incomplete posts:

global $more;
$more = 0;
//The code must be inserted ahead of the call to the content
<?php the_content('Continue Reading'); ?>


Post a Comment