Limit archives widget to only one category

  • Author
    Posts
  • #1304960

    omarrahman
    Member

    Hi.
    I need to edit archive.php, but I have no idea how to edit it so that the archive widget in the sidebar only displays the archives for a specific category(ies). I have tried using plugins like kwebble, but they don’t work. Also after upgrading wordpress, the plugins stop working at times, therefore I’d like a built-in solution.
    What I’d want is that on the sidebar (in the twenty eleven theme that I’m using), I want the archives to display links to monthly posts for all months before the current month. It’s going to look just like any ordinary archives in the sidebar, except that when the user clicks on a month e.g. “January 2013”, the posts for the specific category are only shown and the rest are excluded.
    Thanks in advance.

The topic ‘Limit archives widget to only one category’ is closed to new replies.