• bestfoot

    (@bestfoot)


    I am linking to my archives something like this:
    domain.com/?m=2007

    My archive.php has this:

    <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
    <div class="blogtitletop"></div>
    <h2 class="entrytitle"><span class="date"><?php the_time('m/d/y') ?></span><a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a></h2>
    <div class="blog_entry" id="post-<?php the_ID(); ?>">
    		</div>
    <div class="blogbottom">
    </div>

    I want it to list:
    Jan
    post
    post
    Feb
    post
    Mar
    post

    etc.

    Is there a parameter I can feed it to do it?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Thread Starter bestfoot

    (@bestfoot)

    Something like this:
    <?php $current_month = the_time('F'); ?>
    Would work, but of course it doesn’t because the_time('F') outputs text, not assign a value.

    Thread Starter bestfoot

    (@bestfoot)

    Well that was a pain … there must be an easier way:

    // create a date variable in post format
    $current_date = $post->post_date;
    // break out the month with explode
    $current_month = explode("-", $current_date);

    Is there a way to setup archives based on every 3 months ?

    perhaps a dropdown menu ?

    ie
    – archives 1
    month1
    month2
    month3

    – archives2
    month4
    month5
    month6

    – archives3
    month7
    month8
    month9

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘output annual archive in monthly groupings’ is closed to new replies.