Herself’s Webtools

Webtools for Webmasters: Scripts, HowTos, Templates, Plugins, Widgets, Tips and Useful Information

Herself’s Webtools header image 1

How to fix Wordpress templates that only list partial posts

October 5th, 2007 · No Comments

I really hate blogs that list part of a post followed by a ‘read more’ link. When I moved my blogs from Blogger to Wordpress it seemed all the templates I liked used this partial post thing. Finally this weekend I had time to go through them, find the problem and fix it.

First you’ll need to find all the places in all the *.php files in your theme that say:

<?php the_content(’[Read more →]‘); ?>
<p><a href=”<?php the_permalink() ?>#more-<?php the_ID(); ?>” title=”Read the rest of this entry”>[Read more →]</a></p>

You’ll need to remove all of those and replace them with full copies of the posts.

In most templates you’ll see something like:

<div class=”entry”>
<?php the_excerpt() ?>
<p><a href=”<?php the_permalink() ?>#more-<?php the_ID(); ?>” title=”Read the rest of this entry”>[Read more →]</a></p>
</div>

Replace that with this:

<div class=”entry”>
<?php the_content(); ?>
</div>

Tags: hack your template

0 responses so far ↓

  • There are no comments yet...Kick things off by filling out the form below.

You must log in to post a comment.