Current menu parent - by designerobot - on WordPress WooCommerce support

This topic has 18 replies, 2 voices, and was last updated 7 years, 2 months ago ago by Rose Tyler

  • Avatar: designerobot
    designerobot
    Participant
    September 22, 2017 at 15:44

    Hi,
    When I’m in the portfolio summary page (this page: https://www.8theme.com/demo/woopress/sidebar-boxed/portfolio/) the link ‘Portfolio’ on the main menu is obviously highlighted (in this case in red).
    When I enter in a subpage (for example this project: https://www.8theme.com/demo/woopress/sidebar-boxed/portfolio/demo-portfolio-2/) the link ‘Portfolio’ is not highlighted.
    How can I do to do this link highlighted for every project I see?
    I tried to insert a style for current-menu-parent and current-menu-ancestor in the CSS but it doesn’t work.
    What is the correct code?

    17 Answers
    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    September 25, 2017 at 08:37

    Hello,

    Please try to use this code:

    .single.single-etheme_portfolio .menu-item-36 a {
        color: white;
    }

    Regards

    Avatar: designerobot
    designerobot
    Participant
    September 25, 2017 at 10:53

    Hi, thank you for your reply.
    Unfortunately, this doesn’t work either in the desktop version and in the mobile version too.
    See the link in pvt below.

    Please, contact administrator
    for this information.
    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    September 25, 2017 at 12:05

    Please set needed color http://prntscr.com/gpf0pb and clear browser cache before checking.

    Regards

    Avatar: designerobot
    designerobot
    Participant
    September 25, 2017 at 12:45

    Hi, the strange thing is that it works in Chrome and in Firefox, but not in Safari. Why?
    Moreover, in Chrome and in Firefox, it works only in the main language (IT) not in the other two. Why?
    What do I need to change?

    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    September 25, 2017 at 12:54

    Please change previous code to:

    .single-etheme_portfolio .menu-item-36 a, .single-etheme_portfolio .menu-item-17522 a {
        color: white;
    }

    Regards

    Avatar: designerobot
    designerobot
    Participant
    September 25, 2017 at 14:25

    I updated the script, now it works everywhere (Chrome, Opera, Firefox, Ms Edge, Ms Expopler and Safari).

    The problem is that now it works in Chinese and Italian (before only in Italian) but not yet in English. Any suggestion to make it work in every language?

    Please, contact administrator
    for this information.
    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    September 25, 2017 at 14:43

    Oh I see, please change the code to:

    .single-etheme_portfolio .menu-item-36 a, .single-etheme_portfolio .menu-item-17522 a, .single-etheme_portfolio .menu-item-42 a {
        color: #000000;
    }

    Regards

    Avatar: designerobot
    designerobot
    Participant
    September 25, 2017 at 15:56

    Thank you very much, it now works perfectly!

    Last question: could I do the same with the page news too? That is to have the word “news” highlighted in the menu when I’m inside a post of the news category.

    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    September 26, 2017 at 08:46

    Hello,

    You’re welcome!
    You need to have some CSS skills and add custom styles. You may use developer tools to inspect elements, for example https://developer.chrome.com/devtools and then add custom styles in child theme style.css or use our theme options Custom CSS fields.

    Regards

    Avatar: designerobot
    designerobot
    Participant
    September 26, 2017 at 16:55

    After haved studied your last code and analized the actual style, I tried to add this:

    .archive .menu-item-37 a, .archive .menu-item-17522 a, .archive .menu-item-42 a {
        color: #ffffff;
    }

    But it doesn’t work. Where is the error?

    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    September 27, 2017 at 08:04

    Hello,

    I’ve added code in Custom css for post page http://prntscr.com/gq7inq Please check.

    Regards

    Avatar: designerobot
    designerobot
    Participant
    September 27, 2017 at 09:14

    Hello Rose, thank you very much for your precious help.

    It works, but partially. Because the News section is not yet finished, I inserted only two news for testing for now.

    Your script works only in the News 02 and only in Italian. In English and Chinese it doesn’t work.
    In News 01 it doesn’t work at all in any language.

    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    September 27, 2017 at 09:21

    You need to add the code in Custom css for every post of news for all languages.

    Regards

    Avatar: designerobot
    designerobot
    Participant
    September 27, 2017 at 09:44

    Thank you for the explanation. I now understand how it works.
    I thought was possible to insert it automatically in any post of a certain category (in this case ‘news’).
    Do you think that I can try it? In case, what is the page to copy in the Child in order to edit it?

    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    September 27, 2017 at 10:27

    You’re welcome!
    I would recommend you to use this css code without making changes in the child theme files.

    Regards

    Avatar: designerobot
    designerobot
    Participant
    September 27, 2017 at 10:37

    Ok, I’ll follow your advice. Thank you!

    Avatar: Rose Tyler
    Rose Tyler
    Support staff
    September 27, 2017 at 10:46

    You’re welcome!

    Regards

  • Viewing 18 results - 1 through 18 (of 18 total)

The issue related to '‘current menu parent’' has been successfully resolved, and the topic is now closed for further responses

8theme customization service
We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.