dannyman.toldme.com

About Me : Free Style : Good Reads : News and Reaction : Photographs : Technical : Travels : Unsorted

Search:
December 11, 2005
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

Next: Buzz: Tellme Jazz
Previous: Blog Strategy
Categories: Technical, WordPress
Possibly-Related Posts
My First WordPress Hack
Photos Flickr 0.6
HOWTO: Add Print Stylesheet to WordPress
Mini-HOWTO: What Time is UTC?
Photos Flickr 0.7
Photos Flickr 0.5
WordPress Comment Spam

Responses

August 11th, 2006

Murk

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….

August 11th, 2006

dannyman

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. :/

August 11th, 2006

Murk

If you get a solution, do let me know!

Comment / Tip

. . . or leave a Tip

Leave a comment . . .

  1. For private messages, e-mail me: dannyman@toldme.com
  2. I will not publish or share your e-mail address.
  3. I will not spam you.
  4. Therefor: no anonymous posts; send me your e-mail address!
(required)
(required)

. . . comments from new posters will be held for screening.

Danny Howard is 100% responsible for the content on this site, except some of it is stolen.

All rights are reserved, unless otherwise noted. Generally, I'm a BSD guy, so you can assume implicit permission to adapt, modify, and redistribute my intellectual property with appropriate attribution. Except some of this content is itself re-appropriated, so you'd best ask first, especially for commercial use. Thanks!

You can contact me via e-mail: dannyman@toldme.com

Most of http://dannyman.toldme.com/ is powered by WordPress.

If you're hip to RSS and whatnot, you can subscribe to this site.

These links are for dannyman: login AND backlinks