-
AuthorPosts
-
September 30, 2015 at 3:18 pm #511564
Hi
I have had to change the ‘Shop’ link in my main menu navigation to a custom link rather than the using the ‘shop’ page as I don’t want people to be able to click on it, but be forced to choose from one of the drop down product options.
When it used a standard page for the menu I added the following code to keep it highlighted on all pages within the shop function:
.current_page_parent > a {
background-color: #000000 !important;
color: white !important;
}This is not working now that the link is a ‘custom link’ rather than a page.
Is there some different code I can use to make it work the same way?
thanks
September 30, 2015 at 3:26 pm #511576Hi inchmasterflex!
If it’s a custom link then it has no relation to the other pages. You could edit your other pages and add CSS into the page content to highlight it manually.
Best regards,
ElliottSeptember 30, 2015 at 3:34 pm #511594ok thanks, I’ll do that
September 30, 2015 at 3:46 pm #511619Hi!
Please keep us posted on whether or not this solution works for you.
Regards,
DakeOctober 10, 2015 at 6:13 pm #516854Hi, I’m really sorry to ask another question, but could you tell me where I need to add the code for all the woo commerce product pages (category and single product) to have the ‘Shop’ in the navigation highlighted? I’m just not sure where to do this? Many thanks
October 12, 2015 at 9:01 pm #517678Hi!
For the product pages just add a “.single-product” before your CSS like so.
.single-product .current_page_parent > a { background-color: #000000 !important; color: white !important; }
For the actual shop page then try adding “.post-type-archive-product” like so.
.post-type-archive-product .single-product .current_page_parent > a { background-color: #000000 !important; color: white !important; }
Cheers!
ElliottOctober 13, 2015 at 12:33 am #517786Hi Elliot, I’m afraid neither is working for me. Is there anything else I can try?
thanksOctober 13, 2015 at 1:33 pm #518066Hi!
code should work I think. Did you clear browser cache and hard refresh a few times? Do you have any other custom CSS which is interfering maybe?
Regards,
AndyOctober 13, 2015 at 3:53 pm #518137Hi
Yes and I’ve logged in on two different computers. I’ve just tried deleting other bits of custom CSS but it doesn’t make a difference. I’ve given the login details below as the site isn’t live, if you can think of anything to check or try please feel free to login. Many thanks
October 14, 2015 at 1:17 pm #518626Hey!
please upgrade to Enfold 3.3.2. and then check again if Elliott’s code is working.
Best regards,
AndyOctober 15, 2015 at 11:37 pm #519626Hi
I’ve upgraded but the code still isn’t working :(
Is there anything else I can try?Many thanks, Jen
October 16, 2015 at 7:20 pm #520255Hey!
In your case I had to change it to use the menu link ID but it should be working now.
Regards,
ElliottOctober 16, 2015 at 10:36 pm #520318That’s fantastic, thanks so much for all your help.
October 17, 2015 at 8:00 am #520385 -
AuthorPosts
- The topic ‘Navigation custom link – formatting issue’ is closed to new replies.