• waveminded

    (@waveminded)


    I’ve gone around in circles on the forum and docs trying to figure out if this is possible and I’ve found no answer. I’m trying to make the ‘get_archive’ function exclude all categories except one or only pull data from a single category (which apparently is not possible). I’m looking for an alternate solution.

    The set up is as follows…

    side bar contains: latest 10 post titles from single category #71.

    Below latest 10 posts I’d like it to display “Nov 07, Dec 07, etc…”

    When a month link is clicked it will only return posts from category #71.

Viewing 3 replies - 1 through 3 (of 3 total)
  • moshu

    (@moshu)

    When a month link is clicked it will only return posts from category #71.
    That will not happen, most likely.

    Try to find a recent posts plugin/widget that displays post only from a category or whatever you want.

    get_archives is NOT the tool for that.

    jasonbenesch

    (@jasonbenesch)

    I think this will work:

    $query_month = get_query_var(‘monthnum’);

    query_posts(‘cat=71&monthnum=$query_month’);

    If you add that before the loop on your archive template, that should grab the month you want and then just grab the category you are looking for.

    Thread Starter waveminded

    (@waveminded)

    let me try that

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘get_archives’ is closed to new replies.