Ambrosite Unlink Parent Categories

Unlinks parent categories/taxonomies in category menus and lists. Useful for creating dropdown menus with top-level placeholders. Affects the output o

Author:J. Michael Ambrosio (profile at wordpress.org)
WordPress version required:2.1
WordPress version tested:3.2.1
Plugin version:1.0
Added to WordPress repository:08-07-2011
Last updated:12-07-2011
Warning! This plugin has not been updated in over 2 years. It may no longer be maintained or supported and may have compatibility issues when used with more recent versions of WordPress.
Rating, %:40
Rated by:1
Plugin URI:http://www.ambrosite.com/plugins
Total downloads:3 120
Active installs:10+
plugin download
Click to start download

When activated, this plugin unlinks parent categories (that is, categories that have child categories underneath them in a hierarchy) in category menus and lists. It affects the output of wp_list_categories, as well as all plugins and widgets that use that function.

The plugin works by turning the parent category links into ‘dummy links’. That is, it replaces the href attribute on parent menu items with a ‘#’ (hash/pound) mark. A dummy link is just like a regular link, except that it leads back to the current page when clicked. The dummy links are given an inline style “cursor: default” to prevent the mouse pointer from turning into a hand when hovering over unlinked menu items.

The plugin is compatible with custom hierarchical taxonomies. To create a list of custom taxonomy terms, you must set the ‘taxonomy’ parameter of wp_list_categories. See the FAQ for more information.

Options

To configure the plugin options, go to the Settings menu in the WordPress admin panel and click on ‘Unlink Parent Categories’.

Use Dummy Links
If you uncheck this box, the plugin will unlink the parent categories by replacing the anchor tags with span tags. In some themes, this may cause problems with CSS styling. In order to fix this, you would need to add an additional selector to any rule that targets the anchor tags (see the FAQ for more information). If you are not experienced in writing CSS selectors, then it is strongly recommended to stick with dummy links.

Unlink Current Category
Unlink the current category, in addition to the parent categories.

Remove Link Titles
Remove the title attribute from the links (stops the tooltip from popping up when the mouse hovers over the menu items). This doesn’t have anything to do with unlinking parent categories, but it’s something a lot of people want, so I decided to include it.

Unlink Specific Categories
You can specify which categories you want unlinked, using a comma-separated list of category IDs (example: 3,7,31). If you want only the specified categories to be unlinked, then check the “Unlink specific categories only” box.


Screenshots
FAQ
ChangeLog