Kahi’s Highlight Used Categories, a plugin

Published: On Saturday, March 7, 2009

This plugin allows to highlight used categories – when you're browsing a post (or ev. a page) filed under some categories, these are (in the category list) marked by adding specific class.

  • Classes used-cat and eventually used-cat-parent are added to the particular lis (list-items) in each category-list (wp_list_category()).
  • Based on Show Active Category plugin by Dirk Jaster, inspired by a few comments to that article. Development sponsored by Miroslav Kučera.
  • Remember that there are automatically some classes added: cat-item-{ID}(always) and current-cat and current-cat-parent (when browsing a category).
  • Associated with one of my old posts

Download Highlight Used Categories plugin

  • Version: 1.0

Useful? Bookmark or share:

  • email
  • Digg
  • del.icio.us
  • StumbleUpon
  • Reddit
  • Propeller
  • Twitter

Comments

  1. 1.  Dan wrote: On May 17., 2009 comment number 1

    Really a lifesaver plugin.

    I am not good with php, and I wasted 4 days trying to give custom class to active categories and parent cats on a single post view.

    But eventually your plugin did it on a fly!

    Thank you

  2. 2.  Rolph wrote: On August 20., 2009 comment number 2

    Hello and thanks for valuable plugin. But, I'm using a 3-level of sidebar menu a this plugin unfortunately highlights only current and parent elements. Could you update the plugin to highlight the whole path, for example:
    #menu-left > ul > li.active > ul > li.active > ul > li.current

    no matter how deep is last element, whole path will be „marked“ by li.active (or anything). Please could you do this?
    THX

  3. 3.  Kahi [author] wrote: On August 22., 2009 comment number 3

    ↪ Rolph Sorry, I don't have time now to do that. But you can add the class pretty simply with a single jQuery command…

  4. 4.  Tripp wrote: On March 9., 2010 comment number 4

    Thank you! I can't believe WP doesn't do this automatically.

Add a comment