WordPress Howto: show full content with pictures and css styles on archive, category, tag and search result pages

By default, WordPress show post list differently. On the main page ( the home page of your blog ), you see posts with pictures and normally styles. But on other list pages, like tag pages or category pages, you will find posts with no picture and all text may bump into one whole paragraph (the excerpt view), which make articles hard to read. This article will show you how to correct it and make content with pictures and css style be shown on archive, category, tag and search result pages.

I test this with WordPress 3.0.1 and the default theme (Twenty Ten). You can try it with other version of the system or other themes, but I strongly suggest you backup the original file first before any modification.

First, go to the Theme Editor from the Administration > Appearance > Editor menu. (/wp-admin/theme-editor.php)
Then, from the list on the right, select loop.php. Click it , the editor on the left will open the content of the loop.php file. Copy all the content to a text file to make a backup.
Now, go back to the Theme Editor and look for:

<?php if ( is_archive() || is_search() ) : // Display excerpts for archives and search. ?>
	<div class="entry-summary">
		<?php the_excerpt(); ?>
	</div><!-- .entry-summary -->
<?php else : ?>
	<div class="entry-content">
		<?php the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentyten' ) ); ?>
	</div><!-- .entry-content -->
<?php endif; ?>

Change it into:
<div class="entry-content">
	<?php the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentyten' ) ); ?>
</div><!-- .entry-content -->

and, look for:
<?php if ( is_archive() || is_search() ) : // Only display excerpts for archives and search. ?>
		<div class="entry-summary">
			<?php the_excerpt(); ?>
		</div><!-- .entry-summary -->
<?php else : ?>
		<div class="entry-content">
			<?php the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentyten' ) ); ?>
			<?php wp_link_pages( array( 'before' => '<div class="page-link">' . __( 'Pages:', 'twentyten' ), 'after' => '</div>' ) ); ?>
		</div><!-- .entry-content -->
<?php endif; ?>

Change it into:
<div class="entry-content">
	<?php the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentyten' ) ); ?>
	<?php wp_link_pages( array( 'before' => '<div class="page-link">' . __( 'Pages:', 'twentyten' ), 'after' => '</div>' ) ); ?>
</div><!-- .entry-content -->

Then, update the file. Clean any cache, you WordPress blog should show post list with pictures and full style on tag, category or search result pages. If any thing go wrong, replace the loop.php content with the original one and leave me a comment.

03 May03:55
By Daniel (not verified)

Hi, I dont have a loop.php file and i checked all the other files and couldn´t find the references you mentioned.

If you could shed dome light i would really apreciate it, because when you do a search or click a tag most entries appear with photos but some don't and i would really like that fixed.
Thank you.

06 May22:51
By yang

What WordPress theme are you using?

29 Jan01:55
By wordpress 3.5 templates plugin (not verified)

Good day! I know this is kind of off topic but I was
wondering if you knew where I could locate a captcha plugin for my comment form?
I'm using the same blog platform as yours and I'm having trouble finding one?
Thanks a lot!

25 Jun15:03
By Anonymous (not verified)

Hey man wanted to say thank you for the great content. I have been searching for over 2 hours looking for a fix. Yours was simple, easy, and effective!

26 Jun01:35
By yang

You are welcome.

29 Jul02:43
By Rahul (not verified)

I am using the theme 'Greyzed' and it doesnt have a loop.php file. whenever I click on a tag or category it shows only extract and heading, NO content at all. I wish to show full content of the post whenever sombody click on tag/category or search.

Any help will be appreciated.thanks

04 Nov12:02
By JT (not verified)

Thank you for the post! Worked great!

Post new comment

The content of this field is kept private and will not be shown publicly.