Skip to main content Jump to list of all articles

WordPress Blog Display-Using The More Tag

Here is a simple solution of how to display one full post on your WordPress homepage and sections on other pages such as archives page and categories page.

Enter the more tag in your posts at the point in which you prefer. The more tag looks like this.

Note: Do not put any whitespace between the tag otherwise it will not work.

Go to the settings section in your admin and then to the reading section. Change the blog pages shown at most setting to display the number of posts per page to suit your requirements.

Add the following code below get_header() at the top of your index.php page in your theme template.

<?php if (is_home()) {$page = (get_query_var('paged')) ? get_query_var('paged') : 1; query_posts("showposts=1&amp;amp;paged=$page"); } ?>

Whilst you have your index.php open look for the_content(), and make sure it is empty like this.

<?php the_content(); ?>

Then go to your archives.php and/or categories.php (if you have one) and enter the following.

<?php the_content('Read More'); ?>

You can change this to suit your requirements

That’s it you should now have one post on your main blog page and small sections of posts on your others. Just don’t forget to add the more tags to your posts!

The more tag is supposed to be ignored on the homepage if this method doesn’t work then we will set it manually.

In index.php

Declare the global $more underneath get header().

<?php global $more;?>

Then add the following above the_content();

$more = 1;

For further reading about the more tag visit customising the read more and Template_Tags/query posts on the WordPress Codex.

Topics:

1 reply on “WordPress Blog Display-Using The More Tag”

Avatar of Nick Prignano
Nick Prignano
Nick Prignano On

Awesome. While you didn’t write this post specifically addressing my issue, your method definitely resolved it. I was having an issue with showing a single post on my frontpage and the other methods I tried broke the previous/next links. Your method allowed me to show one post on the front page and the paged navigation links still work. Thanks 🙂

Comments are closed.