About menu construction

Hello there !

Well here is my point.

To handlle a menu in wordpress, we use pages or category and have nices menus on top. Great.


The head menu IS a page or a cat !

I mean :

MENU Header

THE PROBLEM : How to "unlink" the header menu, how to just have a TITLE menu, which does NOT link to anything, since people WILL NOT clic on the title. So it is a useless page and content duplication since if I want people to access the page content I must add the menu link :

Menu header page 1
>> Page 1

This is possible with the menu function (if the theme accept it) but it is still dupplicate content !

Any hack possible to create a menu TITLE which does not LINK to anything ?

  • Mason

    Hello Aphrodite,

    In this scenario is the MENU Header also the home page or just the top level page/category?

    If it's just the top level, you can have your navigation links only display "child of" the current page. That should do the trick.

    If it's more specific then that (they're not child pages of each other) you could hardcode it like this:
    <ul id="nav">
    <li <?php if (is_home()){echo ‘class="current_page_item"’;}?>>/">Home
    <?php wp_list_pages(’title_li=&include=10,11,12?); ?>
    <?php wp_list_categories(’orderby=order&title_li=&depth=1&hide_empty=0?); ?>

    I put the "is_home" in there to provide a link to the homepage, but if you don't want this you can remove it. Also, note that the list_pages I'm telling which pages for it to include and with categories I can tell what order they should dislay, the depth, and to hide empty categories.

    There's many ways of tackling this stuff and WordPress has a ton of options. Check out the codex for complete info:

  • camparoo

    Aphrodite, I hope I understand what you're looking for – if I do, I do know a work-around for this if you use WordPress Menus to create your site navigation.
    So, what I think you're trying to do: Example here. Check out the (non) link called "Test Menu Item".

    OK, using WordPress Menu function, I created a Custom Link. This did require that I use a link to add it to the menu. After I added this item to the menu, I edited this selection, removing the link and saving the menu.

    Title in the navigation that isn't a link!

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.