[Resolved] First link in Navigationbar is not clickable
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(); ?> </div></div>
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?
Try disabling plugins to find whether any are responsible.
thank you for your answer.
I disabled all plugins at once, checked (Link didn’t work) and activated them again.
It’s your custom.js file that is causing it. You are unwrapping and then wrapping the element with a <span> tag.
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!
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!
$('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!
- The topic ‘[Resolved] First link in Navigationbar is not clickable’ is closed to new replies.