Support » Themes and Templates » Can't get excerpt to appear.

  • I’m trying to make a page where all the posts appear, at the moment I’ve managed to make a custom template and make a loop that pulls in all the posts. However I can’t seem to get the excerpt to work?

    link to what I have working at the moment.

    http://goo.gl/aC8TO

    <?php
    /*
     * Template Name: All Posts
     */
    ?>
    
    <?php get_header(); ?>
    <div class="content-break">
            <div class="wrapper">
                <div class="one notopmargin post-wrapper">
    
    <?php
    $debut = 0; //The first article to be displayed
    ?>
    <?php while(have_posts()) : the_post(); ?>
    <h2><?php the_title(); ?></h2>
    
    <?php
    $myposts = get_posts('numberposts=-1&offset=$debut');
    foreach($myposts as $post) :
    ?>
    
    <?php the_excerpt(); ?>
    <p><?php the_title(); ?><a href="<?php the_permalink(); ?>">Read More...</a></p>
    <?php endforeach; ?>
    
    <?php endwhile; ?>
                </div>
           </div>
            <div style="clear:both"></div>
        </div>
    
    </div>
    <?php get_footer(); ?>

    Any idea’s and I’ll gladly change.

    Thanks

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Can't get excerpt to appear.’ is closed to new replies.