Word Press separating is_archive and is_search within loop.php

Can anyone help me with modifying the loop.php file in the twentyten theme for wordpress.

I would like to display search results totally different to my archive results.

can anyone advise what part of code am i changing? i take it its within the loop.php where it says

<?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; ?>

Who is Participating?
gwkgConnect With a Mentor Commented:
Instead of using this first

if ( is_archive()) :

use is_search first...

if(is_search()) :

// show excerpts

else :

// show posts

You say you want to display archive and search differently, but your code is saying to only display the excerpts for archives and search.

Even the comment says // Display excerpts for archives and search

Everything that isn't an archive or search shows the_content
Andy6350Author Commented:
Thank you for responding

I changed the above code to the code attached so that i could display my posts results different to my search results.

 the following link shows what my posts display like


the link below shows the issues i have with the search, not all the content seems to appear in the content div, only the first post.


If this is not clear then let me know

Many Thanks,
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.