WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Showing entire post in search results (5 posts)

  1. sentryair
    Member
    Posted 1 year ago #

    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?

    Thanks.

  2. esmi
    Forum Moderator
    Posted 1 year ago #

    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.

  3. sentryair
    Member
    Posted 1 year ago #

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

  4. alchymyth
    The Sweeper & Moderator
    Posted 1 year ago #

    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; http://codex.wordpress.org/Child_Themes

    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 ?>
  5. sentryair
    Member
    Posted 1 year ago #

    That finally worked - thanks so much alchymyth!

Topic Closed

This topic has been closed to new replies.

About this Topic