How to use entry-summary with "if"
-
Hello,
i use my own template based on twentyeleven. I always thought that the entry-content is only on individual post pages and the entry-summary is on the posts list, but i can see now that both have the entry-content. Now, i would like to design differently the excerpts of the posts and their pages.
In the content.php, it is :
<?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">→</span>', 'ilwebdesign' ) ); ?> <?php wp_link_pages( array( 'before' => '<div class="page-link"><span>' . __( 'Pages:', 'ilwebdesign' ) . '</span>', 'after' => '</div>' ) ); ?> </div><!-- .entry-content --> <?php endif; ?>
which means for me that the entry-summary shows up only on search pages.
How should i change the first part of the “if” condition if i would like that the entry-summary shows up NOT ONLY on search pages but also on the posts list instead of the entry-content ? (Of course, on the individual post pages entry-content should remain).
Thanks in advance !
- The topic ‘How to use entry-summary with "if"’ is closed to new replies.