WordPress > Custom Category Listing by excluding Category Slug matches

Posted by Scott B on Stack Overflow See other posts from Stack Overflow or by Scott B
Published on 2010-04-15T19:48:30Z Indexed on 2010/04/15 19:53 UTC
Read the original article Hit count: 148

Filed under:
|
|

I have a group of categories where the slug of each has a prefix "mycat-" and I would like to insert code into my sidebar.php file to create a custom sidebar widget that lists all categories except those preceeded by "mycat-".

Any help much appreciated.

Example Categories (by slug)...

mycat-hidden, mycat-favorites, mycat-nofollow, mycat-noindex, favorites, recently-updated, hot-links, etc

Given the above categories, I'd want the listing to be:

  • Favorites
  • Recently Updated
  • Hot Links

© Stack Overflow or respective owner

Related posts about php

Related posts about Wordpress