Clone wiki

Wordpress Relative Menu Item Plugin / Home

Installation And Activation

The best instructions for installing and activating any plugin - including this one - can be found at Wordpress Codex - Mangaging Plugins


When creating a custom menu item (as per Wordpress Codex - Menu Custom Links) simply prefix the relative part of your url with %ROOT%.

Let's say your site lives at and you want a link to When you create a new custom link for your wordpress menu simply type in:


This works just as well if your wordpress is installed in a subdirectory of the site. Let's say wordpress lives at and you want a link to then, exactly as before, you just type in:


Admin Options

This plugin currently has no administration options associated with it.


You may prefix the %ROOT% with http://. It makes no difference either way. The link MUST start with either "%ROOT%" or "http://%ROOT%" though. Otherwise the search and replace will fail.

Technical Details

This plugin simply adds an action to the wp_nav_menu_items hook and does a string replace of http://%ROOT% with the value returned by the function get_bloginfo("url").

Report A Bug

This plugin has it's own where you can report any bugs you find.

Who Am I?

This plugin was originally written by Perch Ten Design