This topic has 18 replies, 2 voices, and was last updated 7 years, 2 months ago ago by Rose Tyler
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?
Hello,
Please try to use this code:
.single.single-etheme_portfolio .menu-item-36 a {
color: white;
}
Regards
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 set needed color http://prntscr.com/gpf0pb and clear browser cache before checking.
Regards
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?
Please change previous code to:
.single-etheme_portfolio .menu-item-36 a, .single-etheme_portfolio .menu-item-17522 a {
color: white;
}
Regards
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?
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
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.
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
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?
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.
You need to add the code in Custom css for every post of news for all languages.
Regards
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?
You’re welcome!
I would recommend you to use this css code without making changes in the child theme files.
Regards
Ok, I’ll follow your advice. Thank you!
You’re welcome!
Regards
The issue related to '‘current menu parent’' has been successfully resolved, and the topic is now closed for further responses