Wordpress Themes - WP Forum at BFA
There will be no more development for Atahualpa (or any other theme), and no support. Also no new registrations. I turned off the donation system. I may turn the forum to read only if it gets abused for spam. Unfortunately I have no time for the forum or the themes. Thanks a lot to the people who helped in all these years, especially Larry and of course: Paul. Take care and stay healthy -- Flynn, Atahualpa developer, Sep 2021

Wordpress Themes - WP Forum at BFA » WordPress Themes » Atahualpa 3 Wordpress theme » Page & Category Menu Bars »

[SOLVED] Is it possible to keep the PARENT page highlighted in the menu?


  #1  
Old Dec 4, 2009, 01:58 PM
qda
 
10 posts · Dec 2009
Red face [SOLVED] Is it possible to keep the PARENT page highlighted in the menu?

Is there a way to make the parent page in the Page Menu highlighted when one of it's child pages is visited?
  #2  
Old Dec 5, 2009, 05:34 AM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
you can use a CSS Insert (ATO->add HTML/CSS Inserts->CSS Inserts) like this
HTML Code:
/* ================================================ */
/* Here is how to change the child menu items       */
/* ================================================ */
li.current_page_item ul.rMenu-ver li a:link, 
li.current_page_item ul.rMenu-ver li a:active, 
li.current_page_item ul.rMenu-ver li a:visited, 
li.current_page_item ul.rMenu-ver li a:hover, 
li.current_page_item ul.rMenu-ver li,
li.current_page_item ul.rMenu-ver {
	background: #ffffff !important;
	color: #2912E7 !important;
}
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #3  
Old Dec 6, 2009, 01:45 PM
qda
 
10 posts · Dec 2009
Quote:
Originally Posted by juggledad
you can use a CSS Insert (ATO->add HTML/CSS Inserts->CSS Inserts) like this
HTML Code:
/* ================================================ */
/* Here is how to change the child menu items       */
/* ================================================ */
li.current_page_item ul.rMenu-ver li a:link, 
li.current_page_item ul.rMenu-ver li a:active, 
li.current_page_item ul.rMenu-ver li a:visited, 
li.current_page_item ul.rMenu-ver li a:hover, 
li.current_page_item ul.rMenu-ver li,
li.current_page_item ul.rMenu-ver {
	background: #ffffff !important;
	color: #2912E7 !important;
}
The comment in the code above says 'to change the child menu items' - before I try it, I want to confirm that we are talking about changing the PARENT <li> in the page menu, when a child page is visited.
  #4  
Old Dec 6, 2009, 08:24 PM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
sorry, copied the wrong code try this
HTML Code:
/* ================================================ */
/* how to highlight parent of current page          */
/* ================================================ */
ul.rMenu li.current_page_parent a:link, 
ul.rMenu li.current_page_parent a:active, 
ul.rMenu li.current_page_parent a:hover, 
ul.rMenu li.current_page_parent a:visited, 
ul.rMenu li.current_page_parent {
background: #00ffff !important;
}
/* ++++++++++++++++++++++++++++++++++++++++++++++++++ */
Note if you have A the parent of B the parent of C and you are on page C, this will only highlight B, if you want A and B highlighted use current_page_ancestor instead of current_page_parent
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #5  
Old Jan 29, 2010, 07:24 AM
vonspark
 
1 posts · Jan 2010
Bergen, Norway
This fixed my problem! Thanks a lot!
  #6  
Old Aug 7, 2010, 11:10 AM
interfasys
 
46 posts · Aug 2010
Switzerland
Quote:
Originally Posted by juggledad
Note if you have A the parent of B the parent of C and you are on page C, this will only highlight B, if you want A and B highlighted use current_page_ancestor instead of current_page_parent
I've tried with current_page_ancestor, but it doesn't really work, because it highlights all the B items, so the user doesn't know where he is in the B sub-menu.
The selected elements of A and B have the current-menu-ancestor class, but sub-elements inherit the properties.
  #7  
Old Aug 7, 2010, 11:55 AM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
In WP 3.0+ with the new menus, try using 'current-menu-parent' in place of 'current_page_parent'
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support

Bookmarks



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to remove parent slug from child page's permalink? Tarzanna77 Page & Category Menu Bars 9 Aug 21, 2010 01:45 PM
Subpages are all highlighted when parent page is selected on page menu bar danielphenry Page & Category Menu Bars 9 Feb 27, 2010 01:34 AM
Child pages don't keep parent page in menu highlighted ribbu Page & Category Menu Bars 12 Dec 15, 2009 12:43 PM
How do I hide a parent page in the top navigation bar freyakat Page & Category Menu Bars 1 Aug 26, 2009 06:29 PM
disable links in category menu for parent categories (only childless categories link) qcook2000 Page & Category Menu Bars 0 May 15, 2009 09:09 PM


All times are GMT -6. The time now is 03:28 PM.


Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.