• Hello,
    I was hoping someone could inform me of how to add navigation to my archives page. Here is my archives page code as it stands at http://bloodsweatvector.com/archives :

    ——
    <?php
    /*
    Template Name: Archives
    */
    ?>
    <?php get_header(); ?>
    <div id=”pagebox”>
    <div id=”leftcontent”>
    <div class=”archivebox”>
    <h1>Vector Art Archives</h1>
    <?php

    // Declare some helper vars
    $previous_year = $year = 0;
    $previous_month = $month = 0;
    $ul_open = false;

    // Get the posts
    $myposts = get_posts(‘numberposts=-1&orderby=post_date&order=DESC’);

    ?>

    <?php foreach($myposts as $post) : ?>

    <?php

    // Setup the post variables
    setup_postdata($post);

    $year = mysql2date(‘Y’, $post->post_date);
    $month = mysql2date(‘n’, $post->post_date);
    $day = mysql2date(‘j’, $post->post_date);

    ?>

    <?php if($year != $previous_year || $month != $previous_month) : ?>

    <?php if($ul_open == true) : ?>

    <?php endif; ?>
    <br style=”clear:both;height:1px;line-height:1px;” />

    <h2><?php the_time(‘F Y’); ?></h2>
    <br style=”clear:both;height:1px;line-height:1px;” />

    <div>

    <?php $ul_open = true; ?>

    <?php endif; ?>

    <?php $previous_year = $year; $previous_month = $month; ?>

    <div class=”browsebox”><?php the_thumb(); ?>
    <div class=”info”><h1>“>
    <?php the_title(); ?>

    </h1><span class=”linetwo”>“><?php comments_number(‘no responses’,’1 response’,’% responses’); ?> – Posted <?php the_time(‘m.d.y’) ?></span></div></div>

    <?php endforeach; ?>
    </div>

    </div>

    </div>

    <br style=”clear:both;” />
    </div>
    </div>
    <?php get_sidebar(); ?>
    <br style=”clear:both;” />
    <?php get_footer(); ?>
    ————–

    Is there anyway to break up the posts with some form of navigation? Ideally I’d like to use my pagenavi plugin, but not sure of how to integrate. Simply sticking it in and lower the post display count in the php call doesn’t do anything. Except lower the amount of posts displayed, but still no functional navigation. Any help is much appreciated. Thanks.

The topic ‘Adding navigation to archive page?’ is closed to new replies.