How to Create a Custom WordPress Navigation Menu with Menu Manager Plugin

26

Update 08/05/2010: The custom navigation function is now built into WordPress 3.0. See: Solostream Themes and WordPress 3.0 Menu Management Function.

With most WordPress themes, your site navigation menu is based on your pages. For each page, a link is created in the navigation menu, and the link text is based on the title you choose for the page. This method of creating a site navigation menu is inferior for many reasons, some of which are these:

1. It doesn’t allow you to include 1 or more category pages in your nav menu.
2. It doesn’t allow you to exclude 1 or more pages from the nav menu.
3. It doesn’t allow you to include links to an external site in your nav menu.
4. It doesn’t make it easy for you to control the order of the links in your nav menu.
5. It doesn’t allow you to use navigation link text that’s different from the page title.

To deal with such issues, I’ve seen some WordPress theme developers who are building a custom navigation menu function into their themes. At first glance, this seems like a great feature to include in a WordPress theme, and I’ve considered it for Solostream themes.

Ultimately, though, I decided against it, because what happens when you decide to change your theme? Once you move to a different theme, your navigation structure is toast. It’s great for the theme developer, because you’re less likely to switch to a competitor’s theme, but it limits you as the user.

That’s what I love about the Menu Manager plugin. It gives you complete control over your navigation menu without locking you into using a specific theme. With Menu Manager, you can include or exclude any page or category you like. You can also create links to external pages if you like.

As far as the link text, you can make it whatever you want. So, if you have a page with the title “Learn a Little More About Me,” you can just use “About” as the navigation link. Further, there’s a drag-and-drop function that allows you to order you navigation links any way you choose.

Here’s a short video tutorial showing how to create your navigation menu with Menu Manager.

Here’s the code I used in the video to install the Menu Manager plugin:

<ul>
<?php /*If Menu Manger is activated, run it */ if (function_exists('mm_menu')) { ?>
<?php mm_menu(); ?>
<?php /* If Menu Manger is not active, run the usual navigation code */ } else { ?>
<?php wp_list_pages('title_li='); ?>
<?php } ?>
</ul>

About the Author

Michael Pollock is the marketing and product development guy for Solostream. He's also an Internet business coach who teaches bloggers, coaches, consultants and other creative entrepreneurs how to use the Internet to earn more money and live an amazing life. Visit Michael's Internet Business Coaching site.

Comments About "How to Create a Custom WordPress Navigation Menu with Menu Manager Plugin"

Trackback URL | Comments RSS Feed

  1. Tyler KB says:

    I’d love to integrate dynamic menu highlighting using something like a conditional “current_page_item” id on the menu s that I can use as a CSS selector to highlight the current page in the nav menu. Am I missing something that’s already built in to facilitate this? If not, do you have any plans to add this to the MM plugin?

  2. Soweto says:

    I’m having trouble with the menu in the Mystique theme. Is there a different code I need to put in?

  3. Soweto says:

    I can’t get this to work correctly in the Mystique theme.

  4. Soweto says:

    I was trying to use this menu in the Mystique theme but the menu shows up like regular text with bullets one under each other.

  5. Tom Piggott says:

    Hi, thanks for the tutorial. I’ve made my navigation system and got my pages ordered correctly. The only thing is, the splash / home page has disappeared! How can I get this back as I can no longer navigate to the home page where everything is being posted!

    Would it be easier to re-route my posts to a different page? ie. one that I have just created?

    Any help would be greatly appreciated.

    This is the address of my site:

    http://www.barnyscott.co.uk/blog

    Thanks in advance,

    Tom

  6. AA says:

    It works great except on thing. The drop down does not appear to be working with WordPress 3.0
    There is supposed to be drop down items under Blog
    http://uaspilot.com

    Any advice

  7. C says:

    Hi, I did this and it worked great- except for one thing. Under one of the ‘customs’ I added a subpage and it’s visible all the time (shows up under the custom). Can I hide it so it’s only visible when i roll over the custom?

  8. Jerry says:

    Mike, does the coding that you posted work for Sublime also?

    • Actually, it would be a little different. Find this code:

      <ul>
      <?php if ( $wp_sublime_hide_home_link == 'no' ) { ?>
      <li><a href="<?php bloginfo('home'); ?>">Home</a></li>
      <?php } ?>
      <?php wp_list_pages('title_li='); ?>
      </ul>

      Replace with this:

      <ul>
      <?php /*If Menu Manger is activated, run it */ if (function_exists('mm_menu')) { ?>
      <?php mm_menu(); ?>
      <?php /* If Menu Manger is not active, run the usual navigation code */ } else { ?>
      <?php if ( $wp_sublime_hide_home_link == 'no' ) { ?>
      <li><a href="<?php bloginfo('home'); ?>">Home</a></li>
      <?php } ?>
      <?php wp_list_pages('title_li='); ?>
      <?php } ?>
      </ul>

  9. Dennis says:

    Wow, wouldn’t you know it. I was really in need of a plugin like this. It’s like you are psychic! :)

  10. kathryn says:

    Hi All, I’m not having an luck with this plugin, and now my menus are awry – it’s all under “Home” – Chicagoartmagazine.com – try IE and Firefox, they look very different.

    Anway, my code is below. I see the code you’re adding, but I can’t (squinting at the video) figure out what code you’re pulling out. So after cutting and pasting, this is what my header code looks like:

  11. M Kruegel says:

    THANK YOU! This is my first blog that I’ve designed and am trying to build and your plugin and video have been the easiest part! I am so excited! Now, if I can just figure out my missing 2nd sidebar. Do you have any videos about that? :)

    Thanks again,
    Michele

    • My pleasure Michele. Glad it was helpful. It looks like you’ve maybe figured out how to get that second sidebar to show up. If not, my best advice would be to check with the theme creator.

  12. Your video is so much usefull for me.. thank’s…

  13. David Cary says:

    Outstanding Michael! Worked the first time…thank you, thank you.

  14. Kel says:

    This is a pretty cool plugin, however I understand per Jane Wells that WordPress 3 will ship with the Woo Menu Navigation system.

    http://lists.automattic.com/pipermail/wp-ui/2010-February/000143.html

    http://www.wptavern.com/woo-to-power-menu-management-in-wp-3-0

    Will Solostream support this new woo menu by default?

  15. Thanks michael.. Nice video and posts.. Good Luck..

Post a Reply




Site Meter