Support » Fixing WordPress » Showing entire post in search results

  • Resolved sentryair


    I’ve searched this issue to death and every result is 3 or 4 years old and doesn’t apply anymore as I can’t find the right parts to edit. I just want to show the entire post in search results instead of having a “continue reading” link. Is there an easy modern fix to this?


Viewing 4 replies - 1 through 4 (of 4 total)
  • esmi


    Forum Moderator

    Yes – although the answer is probably the same same as it was 3 or 4 years ago. You need to edit your theme’s search.php template file to use the_content(). This, of course, assumes that you are not using the <!--more--> tag in any of your posts – in which case you would need some additional code.

    I did find this is in my content-aside file – what do I do with it?

    <?php the_content( __( ‘Continue reading <span class=”meta-nav”>→</span>’, ‘twentyeleven’ ) ); ?>

    if you add the name of your theme into the search keywords, the search results might be more accurate.

    should you be working with Twenty Eleven, start by creating a child theme;

    then, in a copy of content.php in your child theme, look for:

    <?php if ( is_search() ) : // Only display Excerpts for Search ?>

    and change that to:

    <?php if ( false ) : // Don't display Excerpts ?>

    That finally worked – thanks so much alchymyth!

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Showing entire post in search results’ is closed to new replies.