• Hi everyone,

    Having some trouble getting something to work. I’m trying to put the 3 latest posts within a sidebar on a page template. So i’ve added a query loop into a div and everything works fine – (3 posts appear where they should). But when i go in and edit a post and split it up with the <–more–> tag it still shows the whole post and not the ‘teaser’ bit. Heres the code i’m using for the query….

    <?php $my_query = new WP_Query('showposts=3');
      while ($my_query->have_posts()) : $my_query->the_post();
      $do_not_duplicate = $post->ID; ?>
    
        <div id="post-<?php the_ID(); ?>" class="<?php sandbox_post_class() ?>">
    				<h2 class="entry-title"><?php the_title() ?></h2>
                    <a href="<?php the_permalink() ?>" title="<?php printf(__('%s', 'sandbox'), wp_specialchars(get_the_title(), 1)) ?>" rel="bookmark">
                    <div class="entry-content">
    <?php the_content() ?>
    
    <?php wp_link_pages("\t\t\t\t\t<div class='page-link'>".__('Pages: ', 'sandbox'), "</div>\n", 'number'); ?>
    
    <?php edit_post_link(__('Edit', 'sandbox'),'<span class="edit-link">','</span>') ?>
    
    				</div>
                    </a>
    			</div><!-- .post -->
      <?php endwhile; ?>

    Why wouldn’t the ‘teaser’ thing still work in this loop if it works in the index loop?

  • The topic ‘post ‘teaser’ not showing’ is closed to new replies.