Welcome, guest!

Feel free to read the blog, browse for themes, or join the club.

Widgets Reloaded Feature Request: Exclude Categories in Archives

  1. First off, I want to say how much I love the Widgets Reloaded plugin. I use it in almost every project that I develop.

    I have a few projects where I am using posts as part of an FAQ, theme or plugin listing, then pull them in to their appropriate sections via a custom page template. These projects also have a regular blog that pulls in the remaining categories.

    I am able to exclude categories in the previous/next links, archives.php and category.php template files, but I am not able to exclude them from the Archives widget.

    I've found a plugin that adds a cat parameter to wp_get_archives() to limit the posts used to generate the archive links. It's called Archives For A Category by Rob Schluter (http://kwebble.com/blog/2007_08_15/archives_for_a_category), and it works great. However, it requires that I hardcode the call to list the archives into the sidebar, which defeats the purpose of having a widgetized sidebar.

    I was wondering if you would consider including this type of functionality in your Archives widget to allow us to exclude categories from the Archives listing.

    Thanks in advance for considering this Justin.

  2. You must be a logged-in exclusive member to view this reply.

  3. Thanks for the quick response Justin. :)

    I was using the Archives widget to list the monthly archives in the sidebar: <?php wp_get_archives('type=monthly&cat=-6, -7, -8, -9, -10, -11, -12'); ?>

    For now, I've hardcoded it back into the sidebar right after the dynamic_sidebar code ends, so it will display after the rest of the widgets in the sidebar.

    It seems odd that WordPress doesn't include this parameter by default, since it is offered for so many other template tags. Have you heard/read anything that explains why it isn't included for wp_get_archives?

  4. You must be a logged-in exclusive member to view this reply.

Reply

You must log in to post.

Limited Access

If you have an account, please take a moment to log in.

Non-exclusive members have limited access to the support forums.

To enjoy the full range of support, sign up for an exclusive membership in the theme club.

Support Forums

  • Bliss Theme (202 posts)
  • Hybrid Theme (17,030 posts)
  • Options Theme (10,322 posts)
  • Structure Theme (2,624 posts)
  • Visionary Theme (767 posts)
  • bbPress Themes (293 posts)
  • WordPress Plugins (1,617 posts)
  • General Discussion (3,979 posts)