Title: Ambrosite Unlink Parent Categories
Author: ambrosite
Published: <strong>July 8, 2011</strong>
Last modified: July 12, 2011

---

Search plugins

This plugin **hasn’t been tested with the latest 3 major releases of WordPress**.
It may no longer be maintained or supported and may have compatibility issues when
used with more recent versions of WordPress.

![](https://s.w.org/plugins/geopattern-icon/ambrosite-unlink-parent-categories.svg)

# Ambrosite Unlink Parent Categories

 By [ambrosite](https://profiles.wordpress.org/ambrosite/)

[Download](https://downloads.wordpress.org/plugin/ambrosite-unlink-parent-categories.zip)

 * [Details](https://wordpress.org/plugins/ambrosite-unlink-parent-categories/#description)
 * [Reviews](https://wordpress.org/plugins/ambrosite-unlink-parent-categories/#reviews)
 *  [Installation](https://wordpress.org/plugins/ambrosite-unlink-parent-categories/#installation)
 * [Development](https://wordpress.org/plugins/ambrosite-unlink-parent-categories/#developers)

 [Support](https://wordpress.org/support/plugin/ambrosite-unlink-parent-categories/)

## Description

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

[⌊The Unlink Parent Categories configuration page⌉⌊The Unlink Parent Categories 
configuration page⌉[

The Unlink Parent Categories configuration page

## Installation

 * Upload ambrosite-unlink-parent-categories.php to the /wp-content/plugins/ directory.
 * Activate the plugin through the Plugins menu in WordPress.
 * All parent categories in menus created with wp_list_categories will become unlinked
   as soon as the plugin is activated. It will also automatically unlink newly created
   parent categories as the category hierarchy is built.
 * Go to the Settings menu in the WordPress admin panel, and click on Unlink Parent
   categories to configure the plugin options.

## FAQ

  I installed the plugin but it does not seem to be working. Why?

Unlink Parent Categories only affects the output of wp_list_categories. If your 
menu is not being generated by that functions, then the plugin will not work. If
you want to test whether this is an issue with your menu, put the default ‘Categories’
widget into your sidebar. The Categories widget uses wp_list_categories, so if the
parent categories are unlinked there, but not in your navigation menu, it means 
that your menu is not using wp_list_categories.

  How can I use this plugin with custom taxonomies?

You must set the ‘taxonomy’ parameter of wp_list_categories in order to generate
a list of custom taxonomy terms, as explained in the WordPress Codex:

https://codex.wordpress.org/Template_Tags/wp_list_categories#Display_Terms_in_a_custom_taxonomy

Once the taxonomy parameter is set, the plugin will unlink the parent terms in the
list, just as it does with normal categories. You can also set a custom taxonomy
for the default Categories widget, by putting the following code into functions.
php:

    ```
    function wc_args( $cat_args ) {
            $cat_args['taxonomy'] = 'my_taxonomy';
            return $cat_args;
    }
    add_filter('widget_categories_args', 'wc_args');
    ```

  I do not want to use dummy links. How can I fix my menu styles when the parent
categories are unlinked?

If you uncheck ‘Use Dummy Links’, the plugin will unlink the parent categories by
replacing the anchor tags with span tags. In some themes, this may cause styling
problems if there are CSS selectors targeting the anchor tags that have been removed.
In order to fix this, you must add an additional selector to any rule that targets
the anchor tags. The CSS rules are different for every theme, so I cannot give specific
instructions. As a general example, if your menu styles look like this:

    ```
    #menu li a {
        some styles ...
    }
    ```

Then you would need to add an additional selector which targets the span:

`#menu li span,

  menu li a {

some styles …
 }`

## Reviews

![](https://secure.gravatar.com/avatar/b382bcf0dcb8789f25830744642416830ada9527ee26aaee04a00333703250e1?
s=60&d=retro&r=g)

### 󠀁[not working](https://wordpress.org/support/topic/not-working-1831/)󠁿

 [Mladen Gradev](https://profiles.wordpress.org/joe8104/) September 3, 2016

Sound like what I was searching for, but unfortunately the plugin is not working
with current WP version and need to updated.

 [ Read all 1 review ](https://wordpress.org/support/plugin/ambrosite-unlink-parent-categories/reviews/)

## Contributors & Developers

“Ambrosite Unlink Parent Categories” is open source software. The following people
have contributed to this plugin.

Contributors

 *   [ ambrosite ](https://profiles.wordpress.org/ambrosite/)

[Translate “Ambrosite Unlink Parent Categories” into your language.](https://translate.wordpress.org/projects/wp-plugins/ambrosite-unlink-parent-categories)

### Interested in development?

[Browse the code](https://plugins.trac.wordpress.org/browser/ambrosite-unlink-parent-categories/),
check out the [SVN repository](https://plugins.svn.wordpress.org/ambrosite-unlink-parent-categories/),
or subscribe to the [development log](https://plugins.trac.wordpress.org/log/ambrosite-unlink-parent-categories/)
by [RSS](https://plugins.trac.wordpress.org/log/ambrosite-unlink-parent-categories/?limit=100&mode=stop_on_copy&format=rss).

## Changelog

#### 1.0

 * Initial version.

## Meta

 *  Version **1.0**
 *  Last updated **15 years ago**
 *  Active installations **10+**
 *  WordPress version ** 2.1 or higher **
 *  Tested up to **3.2.1**
 * Tags
 * [categories](https://wordpress.org/plugins/tags/categories/)[category](https://wordpress.org/plugins/tags/category/)
   [delink](https://wordpress.org/plugins/tags/delink/)[Parent](https://wordpress.org/plugins/tags/parent/)
   [unlink](https://wordpress.org/plugins/tags/unlink/)
 *  [Advanced View](https://wordpress.org/plugins/ambrosite-unlink-parent-categories/advanced/)

## Ratings

 2 out of 5 stars.

 *  [  0 5-star reviews     ](https://wordpress.org/support/plugin/ambrosite-unlink-parent-categories/reviews/?filter=5)
 *  [  0 4-star reviews     ](https://wordpress.org/support/plugin/ambrosite-unlink-parent-categories/reviews/?filter=4)
 *  [  0 3-star reviews     ](https://wordpress.org/support/plugin/ambrosite-unlink-parent-categories/reviews/?filter=3)
 *  [  1 2-star review     ](https://wordpress.org/support/plugin/ambrosite-unlink-parent-categories/reviews/?filter=2)
 *  [  0 1-star reviews     ](https://wordpress.org/support/plugin/ambrosite-unlink-parent-categories/reviews/?filter=1)

[Your review](https://wordpress.org/support/plugin/ambrosite-unlink-parent-categories/reviews/#new-post)

[See all reviews](https://wordpress.org/support/plugin/ambrosite-unlink-parent-categories/reviews/)

## Contributors

 *   [ ambrosite ](https://profiles.wordpress.org/ambrosite/)

## Support

Got something to say? Need help?

 [View support forum](https://wordpress.org/support/plugin/ambrosite-unlink-parent-categories/)

## Donate

Would you like to support the advancement of this plugin?

 [ Donate to this plugin ](http://www.ambrosite.com/plugins)