Link from post page not going to anchor on home page

Support Forums Cian – WP Theme Link from post page not going to anchor on home page

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #4981
    Lauren Kuhlman
    Participant

    I have one problem or the other.

    #1 If I set the menu items as Custom Links and then set the URL for the custom link as #features (for example) when I am on a post page and click “Features” at the top menu it goes to mywebsite.com/my-post/#features instead of mywebsite.com/#features

    #2 If I set the menu items as Custom Links and then set the URL for the custom link as http://mywebsite.com/#features (for example) the all the menu items are always highlighted.

    So… how do I make sure the menu goes to the home page anchor from the post pages while also making sure that only the selected menu item is highlighted.

    #4984
    CreaboxThemes
    Keymaster

    Hi Lauren,

    sorry for the delay to answer.
    You have to use the second way and add the next code in the option Custom JS in the page Appearance > Theme Options > Custom Scripts:

    jQuery('#main-menu li').removeClass('active');

    Regards

    #4989
    Lauren Kuhlman
    Participant

    worked. Cheers!

    #4991
    CreaboxThemes
    Keymaster

    Ok. If you need something more, contact me 😉 Regards

Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.