• Resolved igorlaszlo

    (@igorlaszlo)


    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 !

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter igorlaszlo

    (@igorlaszlo)

    I am sorry, i was too fast, i found it by myself (i was just affraid to change php codes as i do not know a lot about it).

    I changed it to (i deleted the if condition and changed the entry-content to entry-summary) :

    <div class="entry-summary">
    <?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 -->
    Thread Starter igorlaszlo

    (@igorlaszlo)

    I am sorry, i was too fast, i found it by myself (i was just affraid to change php codes as i do not know a lot about it).

    I changed it to (i deleted the if condition and changed the entry-content to entry-summary) :

    <div class="entry-summary">
    <?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 -->
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘How to use entry-summary with "if"’ is closed to new replies.