Support » Fixing WordPress » keep border-bottom when current page
3 years, 11 months ago
I have been trying to keep the border-bottom in each menu item when i am in the current page, here:
and i dont know how to do it..
would anyone give me some light?
thanks in advance 🙂
for instance, build your menu with the WordPress function wp_nav_menu() which would automatically add a .current-menu-item css class to the current page link;
otherwise you end up with a lot of conditional statements like:
<li<?php if( is_page('about-us) ) echo ' class="current-page"'; ?>><a href="about-us/">About Us</a></li>
Thanks alchymyth, i take your advice, i’m going to change my menu to use WP function wp_nav_menu() and see what happens,
i will be back to show the solution, if i find it
3 years, 9 months ago
it worked perfectly!
although i still wonder how i could manage to do it if i dont use wp_nav_menu…