-
AuthorPosts
-
April 26, 2016 at 12:10 pm #622061
Hi,
I’d like parent page menu items to remain highlighted in white when child pages are selected. Help!
Many thanks
SophieApril 27, 2016 at 2:48 pm #623115Hi Purplenaartjie!
Please edit your child pages and choose parent page as parent. Currently none of your main menu items has child menu items and menu items in “get involved” for example, are not set as child pages.
Best regards,
YigitApril 28, 2016 at 11:33 am #623615Hi,
Child pages are set. My client doesn’t want dropdowns in the main menu as they prefer landing pages (I’ve tried to dissuade them but no joy!). So, the site won’t look like child pages are set but they very definitely are… They do want the parent to by highlighted in the menu when child pages are selected tho…
Help!April 28, 2016 at 12:46 pm #623651Hi!
Please add following code to Quick CSS in Enfold theme options under General Styling tab
.av-main-nav li.current_page_ancestor > a > .avia-menu-fx { opacity: 1; visibility: visible; } .av-main-nav li.current_page_ancestor > a > .avia-menu-text { color: white!important; }
Please make sure that > sign is not converted to – http://i.imgur.com/IDXRZQ3.png in Quick CSS field.
Cheers!
YigitApril 30, 2016 at 3:18 pm #625045Hi,
Nope, didn’t do it :( Am attaching a login just in case…
May 3, 2016 at 6:26 am #626212Hey!
We checked the “Jobs” page and the “Get Involved” page remained highlighted which means that the code is working. Please remove browser cache or hard refresh the page: https://cawandsworth.org/jobs
Regards,
IsmaelMay 3, 2016 at 11:27 am #626341Hi,
Have cleared caches, no joy. Code only works is child pages are included in menus… Help!Sophie
May 5, 2016 at 10:16 am #627700Hi,
Sorry for the delay.
Please check the link in private it’s a child page and when you visit it the main page link do get highlighted in white and no submenu is visible just like you requested.
The trick is to add submenus in Appearance > Menu > Main Menu and hide the submenu using css.
If you like to do the same on all pages then remove the page ID from CSS.
If you like this only one selected pages add the page id class name which can be found when you inspect the body element./* hide submenus*/ .page-id-312 .main_menu .sub-menu { display: none!important; }
We setup an example for you please go ahead and add the rest of the submenus in Appearance > menu.
Thank you for using Enfold :)
Best regards,
VinnieMay 11, 2016 at 12:46 pm #630645Hi,
Code didn’t remove submenus…
Sophie
May 12, 2016 at 1:22 pm #631331Hi,
As mentioned above you need to remove the page id and use the rest of the code to hide submenu sitewide. The above code was intended to hide submenu in the example page only.
Best regards,
VinayMay 14, 2016 at 12:19 pm #632343I have removed all IDs from child pages. Using Complaints and Feedback as an example, it isn’t being removed as a dropdown. Help!
May 17, 2016 at 5:56 am #633476Hi,
Could you please provide a screenshot of the issue? Because we’re probably not on the same page here. We checked the “feedback” page and the “About Us” menu is highlighted and the drop down is gone. Was that intentional? This is the code that prevents the submenu from displaying on that page:
.page-id-708 .main_menu .sub-menu { display: none!important; }
Best regards,
IsmaelMay 17, 2016 at 10:10 am #633591Ah, I’d thought I needed to remove each subpage from the dropdown, not the dropdown from each page… sorry!
May 17, 2016 at 10:13 am #633592Is there no way to remove the dropdown automatically from ALL pages and posts? I’d like to avoid my client having to remove dropdowns when they create new pages and posts…
May 17, 2016 at 10:25 am #633599Brilliant! I just removed the page references and it’s all working. Thankyou so much, and apologies for not having understood previously…
-
AuthorPosts
- The topic ‘Parent menu item highlighted when child page is selected’ is closed to new replies.