WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Adding "next month" and "previous month" links to montly archive page (8 posts)

  1. Dalton
    Member
    Posted 7 years ago #

    Is it possible? Much like I have a "next post" and "previous post" on my single page template, I would like to display "next month" and "previous month" on my monthly archive page. I searched through support and docs, but found no info on a function like this. Any help would be appreciated.

    Thanks,
    Dalton

  2. moshu
    Member
    Posted 7 years ago #

    Probably not - without some hacking.
    All the "archive" views, be it by month, day, category, whatever, display a number of posts defined:
    a) in your Otions > Reading settings, or
    b) by a plugin like CQS

    So, if archives view is set to show 45 posts but you have only 30 - you'll have the impression that your monthly archives shows "the month".
    However, if is set to show 15 posts, your X month will be shown on two pages.

  3. Dalton
    Member
    Posted 7 years ago #

    I use CQS to set the number of posts on my archive pages to 100 - knowing that my monthly archive will never go that high. I run a photo blog, and usually post no more than once a day.

    Here's what I have right now:

    http://www.seriouslyexcited.net/2006/12/

    And here's an example of the functionality I'm trying for:

    http://www.flickr.com/photos/daltonrooney/archives/date-taken/2006/12/

  4. moshu
    Member
    Posted 7 years ago #

  5. Dalton
    Member
    Posted 7 years ago #

    Yes! According to the comments section, it looks like that might work. I'm going to give it a try. Thanks, moshu!

  6. Dalton
    Member
    Posted 7 years ago #

    Rats. Doesn't seem to work with WP 2.0. Installed the plugin, but nothing happens.

  7. Dalton
    Member
    Posted 7 years ago #

    I found out that the "get_calendar" function included a similar functionality, so I just pulled out the necessary code and hacked a plugin. The code is very not pretty, but it seems to work, so I'm going to let this go. Thanks for the help, moshu!

  8. foolfillment
    Member
    Posted 7 years ago #

    I used to use the scripty goddess plugin, is there any way you could show me the code you made as what you have on your site is what I want on mine. Thanks in advance

Topic Closed

This topic has been closed to new replies.

About this Topic