Support » Themes and Templates » template to view posts

  • Hi!

    I need some help to make a template so I can see all my posts at a specific page. The code I been written dosent work at all it looks like this

    <?php $ppp=2; ?>
    <?php $theOffset = $ppp * $paged; ?>

    <?php query_posts(‘posts_per_page=$ppp&post_type=post&offset=$theOffset’); ?>

    <?php if ( have_posts() ) while ( have_posts() ) : the_post(); ?>
    <?php echo ‘<div class=”contentBox”>’; ?>
    <?php echo'<h2>’; the_title(); echo'</h2>’; ?>
    <?php the_content(); ?>

    <?php echo'</div>’; ?>
    <?php endwhile; ?>
    <?php next_posts_link() ?>

    post_per_page dosent work and not the <?php next_posts_link() ?> either.

    I also want to have the comments fields and a link to previous posts.

    can someone please help?

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘template to view posts’ is closed to new replies.