Support » Themes and Templates » First link in Navigationbar is not clickable

  • Resolved Franz92


    my problem is explained fast and quick:

    Whatever I put as first element in the Navigationbar (via menu) is not clickable. In this case “Startseite” (german for “Home”)

    It does not work turning all plugins off, but works using TwentyTwelve.

    Even more curious: The link works shortly while the page is loading, but then refuses to – it’s like something is changing it’s property.

    Do you have a guess where I should start searching?


Viewing 9 replies - 1 through 9 (of 9 total)
  • Scott Fennell


    There’s not even a link tag in there. Check your theme files for javascript code aiming to strip the link tag from the first menu item.

    Hi and thanks for the quick reply.

    In my header.php I found this:

    <div id="navigation">
    <?php wp_nav_menu( array('menu' => 'categorynav' , 'container' => '' , 'container_class' => 'false', 'menu_id' => 'catnav', 'menu_class' => 'dropdown dropdown-horizontal', 'echo' => true )); ?>
    <div id="search_wrap">
    <?php get_search_form(); ?>

    This calls the menu and the search form, so I looked in the functions.php – but nothing even remotely does something with the menu in there.

    I also searched for the onclick event, but didn’t get any results. Which kind of code did you have in mind?

    Moderator Andrew Nevins


    Front-end developer

    Scott was referring to JavaScript, than PHP.
    Try disabling plugins to find whether any are responsible.

    Hello Andrew,
    thank you for your answer.

    I disabled all plugins at once, checked (Link didn’t work) and activated them again.

    Moderator Jose Castaneda



    It’s your custom.js file that is causing it. You are unwrapping and then wrapping the element with a <span> tag.

    Scott Fennell


    I suspect the original goal was to remove the link from the current menu item, but something was coded incorrectly and it just strips it from the first menu item.

    Thank you jcastaneda, thank you Scott!

    Scott, you are probably right – at least that makes sense. But I am sorry jcastaneda, the news leak theme doesn’t use a custom.js file – where would one put those scripts?

    The curious navigation bar also has a own stylesheet – but there is no entry which could cause that behavior.

    Thank you for your help and time, people!

    Scott Fennell


    The custom.js file is here:

    Could be called directly in the header.php, could be called in functions.php. Could be called elsewhere in your theme.

    To diagnose, try switching themes and seeing if the file still loads. Alternatively, try disabling all plugins and seeing if the file still loads.

    Hi! Thank you for your answer.

    It is called in the header.php

    People of the Earth, you are great!
    I removed $(' > a').contents().unwrap().wrap('<span class="dir"></span>'); and all works fine now!

    Thank you, thank you very much Scott, Andrew and jcastaneda. I will have a look at your profiles and see if you have a question I maybe can settle. Thank you!

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘First link in Navigationbar is not clickable’ is closed to new replies.