• Hi All

    I have set this up before on an old wordpress blog by changing the the_content() to the_excerpt() and adding a ‘Read More’ link <a href="<?php the_permalink($post->post_id); ?>">Read more...</a>)

    however on my new blog it uses a loop.php and I can’t see what I need to change there to do the same, can any one help or have they tried before?

    The loop code is for twenty ten

    Thanks

Viewing 5 replies - 1 through 5 (of 5 total)
  • do you want to have the excerpts showing on the front page?

    if so, edit loop.php, find:

    <?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">&rarr;</span>', 'twentyten' ) ); ?>
    				<?php wp_link_pages( array( 'before' => '<div class="page-link">' . __( 'Pages:', 'twentyten' ), 'after' => '</div>' ) ); ?>
    			</div><!-- .entry-content -->
    	<?php endif; ?>

    change the first line of the above into:

    <?php if ( is_home() || is_front_page() || is_archive() || is_search() ) : // Only display excerpts for front page, archives and search. ?>

    Thread Starter grishart

    (@grishart)

    Hi I have set up a ‘news page’ as I have a static home page. so the front page to my posts is called news.

    Will I need to change another part of this loop?

    Thanks

    is the ‘news’ page a page template?
    then check this:
    http://codex.wordpress.org/Conditional_Tags#Is_a_Page_Template

    Thread Starter grishart

    (@grishart)

    yes the news is a template page. I just moved it to make a static homepage.

    Thread Starter grishart

    (@grishart)

    So is the correct amend to your code so it will work with my news page this
    <?php if ( is_page_template('news.php') || is_front_page('news') || is_archive() || is_search() ) : // Only display excerpts for front page, archives and search. ?>

    thanks

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘showing posts in brief with read more…’ is closed to new replies.