Title: Ambrosite Unlink Parent Pages
Author: ambrosite
Published: <strong>29 april 2010</strong>
Last modified: 12 februari 2012

---

Plugins zoeken

Deze plugin **is niet getest met de laatste 3 grotere versies van WordPress**. Mogelijk
wordt het niet meer onderhouden of ondersteund. Ook kunnen er compatibiliteitsproblemen
ontstaan wanneer het wordt gebruikt met recentere versies van WordPress.

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

# Ambrosite Unlink Parent Pages

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

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

 * [Details](https://nl.wordpress.org/plugins/ambrosite-unlink-parent-pages/#description)
 * [Beoordelingen](https://nl.wordpress.org/plugins/ambrosite-unlink-parent-pages/#reviews)
 *  [Installatie](https://nl.wordpress.org/plugins/ambrosite-unlink-parent-pages/#installation)
 * [Ontwikkeling](https://nl.wordpress.org/plugins/ambrosite-unlink-parent-pages/#developers)

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

## Beschrijving

**IMPORTANT: This plugin is not compatible with the Mystique theme, nor is it compatible
with the WordPress 3.x custom menu system** (that is, menus created using the drag-
and-drop menu builder under Appearance->Menus). If you want to create an unlinked
parent menu item with the Mystique theme, install Mark Jaquith’s ‘Page Links To’
plugin, and put a ‘#’ (hash/pound) mark in the ‘Point to this URL:’ field to create
a dummy link. For the WP3 menu builder, use a ‘Custom Link’ with a ‘#’ mark in the
URL field. Refer to the documentation in the WP Codex if you need more help: https://
codex.wordpress.org/Appearance_Menus_Screen#Custom_Links

When activated, this plugin unlinks parent pages (that is, pages that have child
pages underneath them in a hierarchy) in page menus and lists. It affects the output
of wp_list_pages and wp_page_menu, as well as all plugins and widgets that use those
functions.

The plugin works by turning the parent page 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.

#### Options

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

**Use Dummy Links**
 Turned on by default as of Unlink Parent Pages version 1.3.
If you uncheck this box, the plugin will unlink the parent pages 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 Page**
 Unlink the current page, in addition to the parent pages.

**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 pages, but it’s something a lot of people want, so I
decided to include it.

**Maximum Depth**
 The maximum depth setting controls how many levels in the hierarchy
of pages are to be unlinked. It works exactly like the ‘depth’ option for wp_list_pages,
as follows:

 * 0 (default) Unlinks all parent pages, anywhere in the page hierarchy.
 * 1 Unlinks top-level parent pages only.
 * 2, 3, … Unlinks parent pages to the given depth.
 * -1 Do not unlink any pages (specify individual pages instead).

**Unlink Specific Pages**
 You can specify which pages you want unlinked, using 
a comma-separated list of page IDs (example: 3,7,31). It works exactly like the ‘
exclude’ option for wp_list_pages. If you want _only_ the specified pages to be 
unlinked, then set max depth to -1.

## Schermafbeeldingen

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

The Unlink Parent Pages configuration page

## Installatie

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

## FAQ

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

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

I know of two specific cases where this is a problem: the Mystique theme, and the
WordPress 3.x custom menu system (that is, menus created using the drag-and-drop
menu builder under Appearance->Menus). The WP 3.x custom menus are generated by 
the wp_nav_menu function, while the Mystique theme uses a non-standard custom function
called mystique_list_pages. If Unlink Parent Pages detects either of these cases,
it will display a warning message.

  Is this plugin compatible with my favorite menu management plugin?

Unlink Parent Pages has been tested and is compatible with a number of other popular
menu management plugins, including Page Menu Editor, Page Lists Plus, Page Links
To, Sub Pages Widget, Exclude Pages, and All In One SEO Pack. It is probably compatible
with most other plugins as well.

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

If you uncheck ‘Use Dummy Links’, the plugin will unlink the parent pages 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 …
 }`

As an example, here are the rules that would need to be added to the bottom of ‘
style.css’ in order to fix the Twenty Ten theme:

`#access span {
 color: #aaa; display: block; line-height: 38px; padding: 0 10px;
text-decoration: none; }

  access ul ul span {

background: #333;
 line-height: 1em; padding: 10px; width: 160px; height: auto; }

  access ul ul :hover > span {

background: #333;
 color: #fff; }`

## Beoordelingen

Er zijn geen beoordelingen voor deze plugin.

## Bijdragers & ontwikkelaars

“Ambrosite Unlink Parent Pages” is open source software. De volgende personen hebben
bijgedragen aan deze plugin.

Bijdragers

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

[Vertaal “Ambrosite Unlink Parent Pages” in je eigen taal.](https://translate.wordpress.org/projects/wp-plugins/ambrosite-unlink-parent-pages)

### Interesse in ontwikkeling?

[Bekijk de code](https://plugins.trac.wordpress.org/browser/ambrosite-unlink-parent-pages/),
haal de [SVN repository](https://plugins.svn.wordpress.org/ambrosite-unlink-parent-pages/)
op, of abonneer je op het [ontwikkellog](https://plugins.trac.wordpress.org/log/ambrosite-unlink-parent-pages/)
via [RSS](https://plugins.trac.wordpress.org/log/ambrosite-unlink-parent-pages/?limit=100&mode=stop_on_copy&format=rss).

## Changelog

#### 1.4

 * Fixed a bug that could potentially cause “undefined variable” and “headers already
   sent” warnings.

#### 1.3

 * Added option to unlink the current page.
 * Added option to remove link titles.
 * Dummy links turned on by default.
 * Added inline style “cursor: default” to dummy links, to prevent the mouse pointer
   from turning into a hand when hovering over unlinked menu items.
 * Added warning messages for Mystique theme and WP 3.x custom menus.

#### 1.2

 * Refactored to improve performance.

#### 1.1

 * Added option to unlink specific pages.

#### 1.0

 * Initial version.

## Meta

 *  Versie **1.4**
 *  Laatst geüpdatet **15 jaar geleden**
 *  Actieve installaties **60+**
 *  WordPress versie ** 2.1 of nieuwer **
 *  Getest t/m **3.3.2**
 *  Taal
 * [English (US)](https://wordpress.org/plugins/ambrosite-unlink-parent-pages/)
 * Tags
 * [delink](https://nl.wordpress.org/plugins/tags/delink/)[menu](https://nl.wordpress.org/plugins/tags/menu/)
   [page](https://nl.wordpress.org/plugins/tags/page/)[Parent](https://nl.wordpress.org/plugins/tags/parent/)
   [unlink](https://nl.wordpress.org/plugins/tags/unlink/)
 *  [Geavanceerde weergave](https://nl.wordpress.org/plugins/ambrosite-unlink-parent-pages/advanced/)

## Waarderingen

 5 van 5 sterren.

 *  [  1 5 ster beoordeling     ](https://wordpress.org/support/plugin/ambrosite-unlink-parent-pages/reviews/?filter=5)
 *  [  0 4 sterren beoordelingen     ](https://wordpress.org/support/plugin/ambrosite-unlink-parent-pages/reviews/?filter=4)
 *  [  0 3 sterren beoordelingen     ](https://wordpress.org/support/plugin/ambrosite-unlink-parent-pages/reviews/?filter=3)
 *  [  0 2 sterren beoordelingen     ](https://wordpress.org/support/plugin/ambrosite-unlink-parent-pages/reviews/?filter=2)
 *  [  0 1 sterren beoordelingen     ](https://wordpress.org/support/plugin/ambrosite-unlink-parent-pages/reviews/?filter=1)

[Je beoordeling](https://wordpress.org/support/plugin/ambrosite-unlink-parent-pages/reviews/#new-post)

[Bekijk alle beoordelingen](https://wordpress.org/support/plugin/ambrosite-unlink-parent-pages/reviews/)

## Bijdragers

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

## Ondersteuning

Iets te melden? Hulp nodig?

 [Het supportforum bekijken](https://wordpress.org/support/plugin/ambrosite-unlink-parent-pages/)

## Doneren

Wil je de groei van deze plugin ondersteunen?

 [ Doneer aan deze plugin ](http://www.ambrosite.com/plugins)