WordPress.org

Ready to get started?Download WordPress

Forums

Display posts and archives by category (4 posts)

  1. cczernia
    Member
    Posted 7 years ago #

    I'm trying to figure out a way that I can have all posts and and archives displayed according to category.

    The way I have it now if I click on the category it displays all posts according to that category. However, it displays all the archives despite category.

    Here is what I'm using for archives:
    get_archives('postbypost', '', 'html', '', '', TRUE);

    The problem with the function is I don't see a way to filter by category.

  2. moshu
    Member
    Posted 7 years ago #

    The way I have it now if I click on the category it displays all posts according to that category.

    That's exactly your category archive.

    The other is a "chronological" archive - so it shows everything.

  3. cczernia
    Member
    Posted 7 years ago #

    True, but I also want my archives (as displayed in the sidebar) to reflect the same items as the post.

    So, if "category A" displays post 1,3,4,5,7 and 8 then I want the archive to display 1,3,4,5,7 and 8. Instead it displays archives 1-8.

  4. moshu
    Member
    Posted 7 years ago #

    With that template tag you are using - you can not. Just read about its parameters in the Codex (preferably before asking stubborn questions!).

    Look for a recent-posts plugin, that allows you to choose the category.

Topic Closed

This topic has been closed to new replies.

About this Topic