TypedbyDropdown Cats Plugin with ability to exclude

Categories
Latest Blog Entries
Dropdown Cats Plugin with ability to exclude TypedBy @ Tuesday, June 22, 2004

She Devil asked me if it was possible to exclude categories in the first Dropdown Categories plugin, I tweaked. It is not possible to exclude categories in that plugin.

So I created a new plugin where it is possible to exclude categories from the drop down list. Read on to find out more about the plugin.

Download the plugin at your own risk. I do not claim responsiblity for damage made to your computer by any file you download from the Typedby.com website. When you download one of the files, it is with the explicit knowledge that you do so at your own risk. This plugin has only been tested with Word Press version 1.2.

Added on February 21, 2005: Version 1.3 of this plugin is for use with WordPress version 1.5 (AKA Strayhorn).

Description: This plugin is to be used within an already existing drop down/jump menu code. It will display a list of individual categories, you have the ability to exclude categories from the drop down list, in the following format:

<option value=”Permalink to Category”>category name</option>

I edited the wp_list_cats() and list_cats functions that originally came with Word Press (ver. 1.2) to fit my needs. Credit for the code goes to the Word Press team. Use “outside the loop”.

The plugin has the ability to:

  • Sort the categories by name or ID number.
  • Subcategories are placed in a hierarchal manner, directly underneath the parent category. This will only work for first level subcategories. For example:

    Parent Category
    - First level subcategory 1
    - First level subcategory 2
    - – Second level subcategory 1 ***** Second level categories (or greater are not supported by this plugin).
    - First level subcategory 3

  • Sort the categories in ascending or descending order.
  • Show the date the last post in the category was made (right next to the category name).
  • Show the number of posts in each category (right next to the category name).
  • Hide the empty categories.
  • Exclude categories from the drop down list. (If you exclude a parent category, all subcategories of will also be excluded).

You may also style the parent categories and child categories (as of version 1.2 of this plugin). You may view the plugin in action by looking at my “by subject” drop down list. You will notice that parent categories are a slade blue color and child categories are a lighter blue in Times Roman font. I have only tested the font and color attributes and I am not entirely sure other attributes will work.

In order to style your parent and child categories, just include the following in your CSS – please be sure to change the attributes to whatever fits your design:

option.parent {
color: #778899;
}

option.child {
color: #A5B1BC;
font-family: “Times New Roman”, Times, serif;
}

Instructions:

Please read the instructions included in the Readme.txt file. The file gives you an example on how to use the plugin.

Download

  • Version 1.3< – The latest version, added on February 21, 2005. For use with WordPress 1.5.
  • Version 1.2(For use with WordPress 1.2 and below)
  • Version 1.1(For use with WordPress 1.2 and below)

story

  • Version 1.3: – Updated to work with WordPress version 1.5 (Strayhorn).
  • Version 1.2: – Added the ability to style parent and child categories.
  • Version 1.1: – Added the ability to show subcategories underneath parent category.
  • Version 1.0: – Initial release.

Thanks for downloading this plugin. Hope it works for you.

Share
Tags: