if ( is_home() || is_archive() || is_search() ) :
Hi,
This doesn’t work for me, I’m using a static page so I also tried is_front_page()?
I’m using a page called ‘Our Blog’ as my posts page.
Any other ideas?
Many thanks
the conditional statement occurs more than once in loop.php – have you edited it all?
btw: this question has been answered before and should be found using forum search.
This doesn’t work for me, I’m using a static page so I also tried is_front_page()?
I’m using a page called ‘Our Blog’ as my posts page.
should make no difference;
the conditional tag is_home() refers to the posts page:
http://codex.wordpress.org/Function_Reference/is_home
http://codex.wordpress.org/Conditional_Tags#The_Main_Page
alternatively, you can edit this whole section:
<?php if ( is_archive() || is_search() ) : // Only display excerpts for archives and 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>', 'twentyten' ) ); ?>
<?php wp_link_pages( array( 'before' => '<div class="page-link">' . __( 'Pages:', 'twentyten' ), 'after' => '</div>' ) ); ?>
</div><!-- .entry-content -->
<?php endif; ?>
and change it to:
<div class="entry-summary">
<?php the_excerpt(); ?>
</div><!-- .entry-summary -->
again, make sure to find and edit all occurrances in loop.php
Thanks for your help. I’ll go through and edit the loop.php file.
I had searched the WordPress forums for this solution, and did find similar questions however must answers were replace the_content() with the_excerpt() and to be honest I didn’t realise the conditional tag is_home() refers to the posts page that isn’t my home page as well.
Least I know for future projects.
Thanks again.
YOu can use <?php if( is_page('5') ) { ?> instead of is_home() ; Replace 5 with your page id which you are using for showing post. I am sure you may have found the solution, but I think it would be helpful for someone else also.