Ready to get started?Download WordPress


[resolved] First link in Navigationbar is not clickable (10 posts)

  1. Franz92
    Posted 1 year ago #

    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?


  2. Scott Fennell
    Posted 1 year ago #

    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.

  3. Franz92
    Posted 1 year ago #

    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?

  4. Andrew Nevins
    Barrel Rider, Spam Zapper & Volunteer Moderator
    Posted 1 year ago #

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

  5. Franz92
    Posted 1 year ago #

    Hello Andrew,
    thank you for your answer.

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

  6. Jose Castaneda
    Posted 1 year ago #

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

  7. Scott Fennell
    Posted 1 year ago #

    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.

  8. Franz92
    Posted 1 year ago #

    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!

  9. Scott Fennell
    Posted 1 year ago #

    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.

  10. Franz92
    Posted 1 year ago #

    Hi! Thank you for your answer.

    It is called in the header.php

    People of the Earth, you are great!
    I removed $('li.menu-item-type-custom > 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!

Topic Closed

This topic has been closed to new replies.

About this Topic