WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Show full posts in search results (3 posts)

  1. jennifer2010
    Member
    Posted 2 years ago #

    Website:
    http://www.madchenarsch.de

    I'm using the default "Twenty Eleven" theme (A child theme) and would like full posts to be shown in search results.

    For example:
    http://www.madchenarsch.de/?s=test&submit=Search

    Instead of showing excerpts with no images, etc - would like it to show full posts as they're shown on homepage, category page, etc...

    Thank you!

  2. alchymyth
    The Sweeper & Moderator
    Posted 2 years ago #

    edit content.php;

    find this section:

    <?php if ( is_search() ) : // Only display Excerpts for 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>', 'twentyeleven' ) ); ?>
    			<?php wp_link_pages( array( 'before' => '<div class="page-link"><span>' . __( 'Pages:', 'twentyeleven' ) . '</span>', 'after' => '</div>' ) ); ?>
    		</div><!-- .entry-content -->
    		<?php endif; ?>

    see this first line with the conditional statement?
    this needs to be removed;
    change the section to:

    <div class="entry-content">
    			<?php the_content( __( 'Continue reading <span class="meta-nav">&rarr;</span>', 'twentyeleven' ) ); ?>
    			<?php wp_link_pages( array( 'before' => '<div class="page-link"><span>' . __( 'Pages:', 'twentyeleven' ) . '</span>', 'after' => '</div>' ) ); ?>
    		</div><!-- .entry-content -->
  3. jennifer2010
    Member
    Posted 2 years ago #

    Worked perfectly! Thanks so much for taking the time to help me, I really appreciate it!

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.