I have a “Team” menu link in the main navigation of my site. I also have a custom template that displays a custom post type “team member.” This is not a page that is visible in the WordPress admin UI. When on a page using this custom template, I want the “Team” menu item to be set as current-menu-item and current-page-item. Is this possible from within my custom template markup?
Thanks!
Hi paepke19,
I’m not sure I understand what you mean by that, please try explaining a bit further and post a link to the site in question so that we can have a closer look.
Regards,
Rikard
Sorry, I’ll try to explain better. Suppose I have a main nav that has 5 items in it. One of those items is “Team.” When you click on “Team” you get the corresponding page and the nav menu changes to highlight “Team” as the active page.
What I am asking is if there is a way to set “Team” as the active page in nav without actually being on the team page?
Does that help?
Hi,
I supposed this is possible if the page is a child page of the “Team” page. Or add the page as a menu item then change its label to “Team”.
Best regards,
Ismael
The page(s) in question is not something in the Pages admin, so I can’t make it a child of “Team” page. It is generated using single-team.php
Hey!
Can you please post the link to your page where you would like to highlight “Team” as active page?
Regards,
Yigit
URLs included in the private section, thanks!
Hi!
Please add following code to Quick CSS in Enfold theme options under General Styling tab
.single-team #menu-item-940 .avia-menu-fx {
opacity: 1;
visibility: visible;
}
.single-team #menu-item-940 a {
color: #8bba34;
}
Regards,
Yigit
Nailed it! Thank you so much. :)
Hi!
You are welcome!
For your information, you can take a look at Enfold documentation here – http://kriesi.at/documentation/enfold/
And if there are features that you wish Enfold had, you can request them and vote the requested ones here – https://kriesi.at/support/enfold-feature-requests/
For any other questions or issues, feel free to post them here on the forum and we will gladly try to help you :)
Regards,
Yigit