Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #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

    #511576

    Hi 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,
    Elliott

    #511594

    ok thanks, I’ll do that

    #511619

    Hi!

    Please keep us posted on whether or not this solution works for you.

    Regards,
    Dake

    #516854

    Hi, 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

    #517678

    Hi!

    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!
    Elliott

    #517786

    Hi Elliot, I’m afraid neither is working for me. Is there anything else I can try?
    thanks

    #518066

    Hi!

    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,
    Andy

    #518137

    Hi

    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

    #518626

    Hey!

    please upgrade to Enfold 3.3.2. and then check again if Elliott’s code is working.

    Best regards,
    Andy

    #519626

    Hi

    I’ve upgraded but the code still isn’t working :(
    Is there anything else I can try?

    Many thanks, Jen

    #520255

    Hey!

    In your case I had to change it to use the menu link ID but it should be working now.

    Regards,
    Elliott

    #520318

    That’s fantastic, thanks so much for all your help.

    #520385

    Hi,

    Glad we could help :-)

    Cheers!
    Rikard

Viewing 14 posts - 1 through 14 (of 14 total)
  • The topic ‘Navigation custom link – formatting issue’ is closed to new replies.