Forums

[resolved] Invisible parent page (2 posts)

  1. chknabeel
    Member
    Posted 1 year ago #

    Hi Everybody,

    I m working on the genesis metric theme. If you go to
    http://www.caparas.com/html_site/
    it would be easrier to understand what I m looking for.
    On the above page I have a navigation menu in the header. When we hover "business development" tab in the nav bar the a dropdown appears. Its fine. When I click on the "business development" tab it takes the user to the business development page. Thats what I do not want to happen. In other words I just want the title of parent pages and but parent pages should not be clickable. This cannot to done by plugin because I have used my own code in the navigation using hooks plugin. Following is my navigation menu code:

    [Code moderated as per the Forum Rules. Please use the pastebin]

    Please Help!

    Thanks

  2. chknabeel
    Member
    Posted 1 year ago #

    Hi Everybody,

    I m amazed nobody is able to answer my post. That was not that difficult. Anyways no worries I have figured out the solution myself.;) Here you go:

    (`
    <div class="widget menupages" id="menu-pages-3"><div class="widget-wrap"><ul class="nav sf-js-enabled">
    <li <?php if(is_home()) { ?> class="current_page_item"<?php } ?>>
    <a href="<?php bloginfo('home'); ?>">Home</a></li>
    <?php wp_list_pages('exclude=5,12,14&depth=1&title_li='); ?>
    <ul>
    <?php wp_list_pages('child_of=5&title_li=<a href=#>'.__('Business Development').'</a>'); ?>
    </ul>
    <ul>
    <?php wp_list_pages('child_of=12&title_li=<a href=#>'.__('Digital Production').'</a>'); ?>
    </ul>
    <?php wp_list_pages('exclude=5,12,2&depth=1&title_li='); ?>
    </div></div>
    `)
    Enjoy !
    Nabeel

Topic Closed

This topic has been closed to new replies.

About this Topic