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">→</span>', 'twentyten' ) ); ?> </div><!-- .entry-content --> <?php endif; ?>
<div class="entry-content"> <?php the_content( __( 'Continue reading <span class="meta-nav">→</span>', 'twentyten' ) ); ?> </div><!-- .entry-content -->
<?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">→</span>', 'twentyten' ) ); ?> <?php wp_link_pages( array( 'before' => '<div class="page-link">' . __( 'Pages:', 'twentyten' ), 'after' => '</div>' ) ); ?> </div><!-- .entry-content --> <?php endif; ?>
<div class="entry-content"> <?php the_content( __( 'Continue reading <span class="meta-nav">→</span>', 'twentyten' ) ); ?> <?php wp_link_pages( array( 'before' => '<div class="page-link">' . __( 'Pages:', 'twentyten' ), 'after' => '</div>' ) ); ?> </div><!-- .entry-content -->
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.
What WordPress theme are you using?
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!
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!
You are welcome.
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
Thank you for the post! Worked great!
Post new comment