Technical, WordPress

WordPress: Last Month / Next Month

I was tweaking the site navigation–and I welcome any feedback a reader may have–and I had to grab a plugin to allow me to link to next month / previous month / next year / previous year:

Next Archive Date / Previous Archive Date Plugin from scriptygoddess

I appreciate scriptygoddess’ work, as I’m using her paginate plugin as well. Unfortunately, the example on her site is kind of nasty. So, if someone is casting about on Google, here’s the code in my sidebar template:

    <?php if (is_year()): ?>
        <p><b>By Year</b><br />
        <?php previous_archive_date() ?>
        <?php next_archive_date() ?></p>
    <?php elseif (is_month()): ?>
        <p><b>Last Month</b><br />
        <?php previous_archive_date() ?>
        <p><b>Next Month</b><br />
        <?php next_archive_date() ?></p>
    <?php endif; ?>

Thanks for the code, Jennifer!

Read More

Categories: Technical, WordPress

  • I’ve been trying to get that going too (it seems like pretty basic functionality to me, and I’m amazed it’s not in WP) – but I can’t get it going, and it looks like it’s not on your pages either!

    Looking at your monthly archive page, it doesn’t seem to be there, well the text bits are….

  • Murk,

    Aye … I had to disable that plugin when it started doing bad things with memory consumption. I’ll find a new solution some day. :/

  • If you get a solution, do let me know!