LJ Custom Menu Links

LJ Custom Menu Links is a plugin that allows you to put extra links in the menus of most WordPress Themes. It is unique in the way that it doesn’t require any code changes to your theme as the extra links are added within WordPress core functionality. This plugin requires no technical knowledge to administer, it is all contained within the WordPress admin pages with a consistent look and feel for ease of use.


  • Add Extra Menu links to your theme
  • Use pages as placeholders for menu links (This allows you full customization as to the location of your links)
  • Control if menus items are shown based on if a user is logged in
  • Shows a logout link if a user is logged in
  • Provides the ability to provide a link back to your admin pages only if a user is logged in
  • Full menu sorting available

To add flexible location links (Dynamic Links) you need to create a new page as a placeholder for that link, under the edit page menu is a box to control what link to show. Please see the screenshots on the next page for a description. Links created in this way dont have the ability to choose the target window (you may still control the visibility of the link via the private or public based on the page settings, and also the ordering based on page settings).

The admin page now also contains a list of Dynamic Links, which can be deleted or edited from within the LJCustomMenuLinks admin section.

To add LJCustomMenuLinks please use the LJCustomMenuLinks item in the Admin section, these links are added to the end of the standard wordpress menu system but have full customization ability.

The plugin has also had an attribution function added. If you would like to provide attribution for the plugin then add the following code into your wordpress theme. The footer is a good place for it.

  if (function_exists('LJCustomMenuLinksAttribution')) {

LJ Custom Menu Links at WordPress Extend

44 replies on “LJ Custom Menu Links”

Works as advertised! Thanks. Any way to make it add the menu item “mixed” within other WP generated menu items (ie Page 1 | LJ Custom Link | Page 2) instead of appending all menu links after the pages?

Short answer is not easily. The main reason I developed this plugin was to show some links only when I was logged in, so the end was the perfect position for them. There may be some way of adding these links in the middle of the pages but not with the current form of this plugin. This maybe something I investigate further if enough people are interested. Thanks for checking out my plugin.

@Jon Smith Thanks for the reply. As I suspected… I wish the next version of WP gets more flexible navigation/menu options. I do like what your plugin does and yes, it’s a pretty cool trick to quickly get the “Logged in” menu items. Thanks again!

This plug-in is perfect for what I wanted to do. Thanks so much for the hard work you put into this and making it available.

I do have one suggestion that I hope you’ll consider. When I have multiple child pages below a parent link, the size of the box that the link is contained in varies. If these could all match the longest child page link, like WordPress does your plug-in menu items would blend in totally with the WordPress ones.

You can see what I mean with the menu on my blog. WordPress pages are linked below “Testimonials” and your plug-in links are below “Gallery”.

If you can make time, it would be great if you could look at this.

Thanks again for a great plug-in!

@Martin Bailey
Hey Martin, Thanks for your input. This works for my theme so I haven’t yet encountered this problem. I am currently downloading the theme that your site is based on for my test environment and will let you know shortly.

Craig, I am not quite sure what you mean. The child links will need a parent to be attached to.

If you dont want the parent to link to anything, create a dummy page and then activate Dynamic Links on the page with a URL of #.

Hope that helps.


Thank for the quick reply Jon,

what i ment was if i create a custom menu like this

>> child 1
>> >> grandchild 1a
>> >> grandchild 1b
>> >> grandchild 1c
>> child 2
>> >> grandchild 2a
>> >> grandchild 2b

is it posible for me to display the grandchild links on the child page with a simpe tag. So on the page “child 1” i can list the grandchild links

grandchild 1a
grandchild 1b
grandchild 1c


I think i know what you mean.

For example this page is listed under “Software -> WordPress Plugins -> LJ Custom Menu Links”

Just a third layer of menus? Or do you want to display them somewhere else like your sidebar?

Sorry if I am not understanding you correctly but if I have then it is a theme/css dependant issue.




Basicly im looking for somthing like this code, that will work for the custom menu

$my_page_id = get_the_ID();

in wordpress this will list the child pages of the current page.

What im look to to is list the child (Custom menu links) on the parent page.

I know i could do it manually like this


but i would have to update the code every time.


I have just tested the wp_list_pages include/exclude commands and it adds all the “Custom menu links” regardless ?


Now I know what you mean.

Maybe you need to use the Dynamic Link side of Custom Menu Links. This works by having a Page as a place holder, you then assign a link to that page (via the page edit screen) and it should do what you are looking for.

>> I have just tested the wp_list_pages include/exclude commands and it adds all the “Custom menu links” regardless ?

This is in part caused by the way Custom Menu Links works, I need to add something to the code that will stop it from outputting unless you are calling wp_list_pages to list everything.

LJ Custom Menu links aren’t part of the page listing, they are added to it after wp_list_pages finishes processing. That is why exclude and include wont work for them. But the Dynamic Links are pages themselves so they behave in the same way with regards to including/excluding, private/published settings.

Hope that helps.



Great idea!
But… is it possible to add the class “current_page_item” to a real current page? Currently the class “current_page_item” is assigned to “home” item…

Can you please provide more details. What are you viewing when current_page_item is assigned to home (All this is still handled by WordPress, my plugin doesn’t change this).

If you can provide more details I may be able to help.



Let’s suppose we have following (standard) pages:
1. About (alias “about”)
2. Contacts (alias “contacts”)
Standard wordpress function wp_list_pages() will generate something like this:

<li class="page_item page-item-1"><a href="http://site.com/about" title="About">About</a></li>
<li class="page_item page-item-2"><a href="http://site.com/contacts" title="Contacts">Contacts</a></li>

If we are on page “About”, wordpress will add current_page_item to the class of the item:
<li class=”page_item page-item-1 current_page_item“><a href=”http://site.com/about” title=”About”>About</a></li>
Next I turn on your plugin and add new page “Portfolio”. For the page I set LJ Custom Menu Links URL = http://site.com/portfolio. Let’s say the URL is the permalink of a category. Now go to the URL.
Your plugin will generate:

<li class="page_item page-item-1"><a href="http://site.com/about" title="About">About</a></li>
<li class="page_item page-item-2"><a href="http://site.com/contacts" title="Contacts">Contacts</a></li>
<li class="page_item page-item-2"><a href="http://site.com/portfolio" title="Portfolio">Portfolio</a></li>

So the current page is “http://site.com/portfolio”, but the menu item has no class “current_page_item”.

Is it possible generate such item?
<li class=”page_item page-item-2 current_page_item“><a href=”http://site.com/portfolio” title=”Portfolio”>Portfolio</a></li>

Ahh, Sorry now I get what you mean.

The answer is no. The idea behind the plugin is to provide outbound links to other sites/whatever you want. The plugin is not aware (or able to be aware, for dynamic links) what page/category/tag is currently being viewed.



Love the plugin! I am having a slight problem, more of a little bug actually. I am using iBlogPro 3 theme (the people that created that theme are how I heard about your plugin) and when I add your plugin, it adds it to the menubar but it repeats it below my actual menu bar. Is there a way to correct this so it only shows in the menubar at the top?

The link in question is NLS Help Forums

Thanks, small donation made 🙂

@Jason Hobbs
Are you using a Subpage plugin? Or does your theme do this for you?

The problem you are having is an incompatibility with the theme or a plugin. The way my plugin works is by grabbing the output of a certain WP function and then appending to it, that is how I can do what I have done without needing theme modification. I have been recently working on this problem and have a few solutions for you.

The next release of LJ Custom Menu Links, due in a couple of days has the ability to stop overriding the wordpress filter action. The only downside to this is you will need to make a minor modification to your theme to display the menus. This is a trade-off between using core WordPress functionality and the ability to have compatibility with other plugins that use the same method.

The second option, and maybe the best option for you in this case would be to use an LJ Dynamic Link. To do this, create a new page called “NLS Help Forums” then use the LJCustomMenuLinks – Dynamic Links box to fill in the link information. Once you have done this delete the NLS Help Forums link from within the LJ Custom Menu Links – Custom Links section.

Let me know how you go and we can see if there is anything else I can do for you.



Help !
I was using the LJ Menu plugins since a couple days . And , 30 minutes ago, the menu just disappear. … I did not touch anything !!!
What can I do ?

Please help me !
The site is avocatcriminel.ca/blogue Thanks !

I just tried to install your plug-in and received this error message:

Parse error: parse error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or ‘}’ in /home/content/d/a/w/dawdesigns/html/wordpress/wp-content/plugins/lj-custom-menu-links/lj-custom-menu-links.php on line 13

I am running the latest version of WordPress, hosted on Go-Daddy.

Any help appreciated.

Using your plugin, is it possible to add icons (in lieu of text) that link to external sites? I *think* so, but not sure how to go about doing it…and this plugin looks like it would solve my challenge.


I am having trouble activating this plugin. This is what it says:

Plugin could not be activated because it triggered a fatal error.

Parse error: syntax error, unexpected T_STRING, expecting T_OLD_FUNCTION or T_FUNCTION or T_VAR or ‘}’ in E:inetpubvhostschadashchay.comhttpdocswp-contentpluginslj-custom-menu-linkslj-custom-menu-links.php on line 13

So… what do I do?


I’m working on a WordPress site where I’m embedding an SMF forum in the WordPress site. I’ve got the SMF Forum embedded and am trying to use your plugin to put a navlink and submenu items at the top of the wordpress page. I’d like to be able to add the option to target the iframe, in addition to _self and _blank. So, in your .php file I added the following code:

<option class="level-1" value="myframe" >Target Iframe named myframe

However, when I go to the actual page, the link opens in the same window but NOT in the iframe, and when I look at the source code, it says:

So the word myframe is not being written to the page.

Any suggestions?


Installed, worked great, then all of the sudden i got the Parse Error out of nowhere. Turned out I was running PHP4 all along and updated to PHP5 and all was good.

AWESOME! I was trying to make placeholder top nav (like people -> tony, carol, lyndon) while people was not clickable. This worked perfectly.

I tried to do something similar with a different plugin but it just didn’t work right.!

Hello, is there a way to choose existing pages as parent. It seems that the plugin only allow me choose links that I created through the plugin as parent.

I’m having a strange issue using your plug-in. I’m trying desperately to configure the “home” menu item to link to different pages based on the users language selection. The custom link menu item in wordpress doesn’t allow for localized URL’s, but your plug-in seems to offer this ability.

I created the link placeholder page and input my urls using both language tags & as well as the qtranslate shortcodes [:en] & [:pt].

The links appear to be in place where the browser can see them, because as I mouse over them I see the correct link being displayed based upon my selected language, but when I click on the “Principal” page link with the Portuguese language selected it always returns me to the english language home page.

Have a look: http://www.golearncalifornia.com/pt/details/

If you hover the mouse over the Principal Menu item you can see it knows the right link to use to return to the portuguese home page, but when you click on it it defaults to the english language home page every time.

I’m stumped and at your mercy for help.

Seems I’m no longer in need of assistance. The issue is resolved somehow, I think it was the use of the qtranslate shortcodes rather than the language tags, but the LJ Custom Menu Links plug-in did the job! Thanks!

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.