0

So I'm finishing up a new site, but I'm stuck on this last issue. Wordpress is pretty confusing. I have my bootstrap navbar setup like so:

Home<--->Shop<--->News<--->Contact Us

In my wordpress's header.php I added my navbar and it looks correct, and works perfectly when I go to the News section, but when I go click on Shop, even though the page loads and fuctions properly, the active tab in the navbar stays on News.

I understand wordpress generates code dynamically such as which page is the active page, but I've never had to do this before so its a bit over my head. I only know how to add the active class to a li tag in HTML so far.

my theme is a slightly modified (navbar and css tweaks) version of "Simple life", and the shop page is running on the woocommerce plugin.

any help is much appreciated, thanks!

Brandon
  • 1
  • 3
  • check this http://stackoverflow.com/questions/26789438/how-to-add-active-class-to-wp-nav-menu-current-menu-item-simple-way – Jomol MJ Dec 13 '16 at 03:42
  • thanks, I tried pasting the code snippet in the bottom of the functions.php but no change. the function calls nav_menu_css_class, maybe that does't affect a bootstrap navbar. – Brandon Dec 13 '16 at 22:04

0 Answers0