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 »

How to keep parent page highlighted while on sub pages?


  #1  
Old Aug 4, 2010, 03:13 PM
wilbrimley
 
21 posts · Jun 2010
I'm not even sure how to word this question. I'm using ATO 3.4.7 and I want to keep the parent page on the menu bar highlighted in my color scheme when the user is on a sub page.

Let's say my main menu bar consists of pages A,B,C with 1,2,3 sub-pages under each. Currently, when I'm on page A-->2, only the 2 is highlighted while A remains blank. I understand this logic but it can be confusing for viewers. Are there any fixes? Thanks for your help.

-Wilford
Attached Thumbnails
Click image for larger version

Name:	screen-capture-9.jpg
Views:	902
Size:	70.9 KB
ID:	658  

Last edited by wilbrimley; Dec 5, 2010 at 09:44 AM.
  #2  
Old Aug 4, 2010, 03:51 PM
lmilesw's Avatar
lmilesw
 
10,176 posts · Jul 2009
Central New York State USA
I know of no way to do what you want and suspect the the conditional logic to accomplish it would be "interesting" and most likely time consuming.
__________________
~Larry (CNY Web Designs)
This site should be a membership site since it so full of good stuff.
Please consider donating which gives you access to even more good stuff.
  #3  
Old Aug 4, 2010, 04:12 PM
wilbrimley
 
21 posts · Jun 2010
I'm still a newbie, so your post is helpful in pointing me in a direction but it's not entirely clear to me. You're saying that I can style the .current_page_ancestor class in the css insert section to change colors? Am I on the right track here? Thanks for your help.
  #4  
Old Aug 7, 2010, 08:56 AM
interfasys
 
46 posts · Aug 2010
Switzerland
Would be great if .current_page_parent and .current_page_ancestor could be introduced in a future revision of the theme.
It would greatly improve the usability of the theme.
  #5  
Old Aug 7, 2010, 10:43 AM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
Please try the BUGFIX 353-01 in the New Versions, & Updating forum for version 3.5.3
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #6  
Old Aug 7, 2010, 10:58 AM
interfasys
 
46 posts · Aug 2010
Switzerland
I've just tried the fix because I tried all afternoon to get my CSS inserts to work and it fixed that , but without the inserts, the parent item is not highlighted.
  #7  
Old Aug 7, 2010, 12:38 PM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
There is a bug in the WordPress menu where it will assign the class 'current-page-parent' to multiple items (http://core.trac.wordpress.org/ticket/14560)

use 'current-menu-parent'.
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #8  
Old Aug 8, 2010, 06:13 AM
interfasys
 
46 posts · Aug 2010
Switzerland
What I meant when I said
Quote:
Would be great if .current_page_parent and .current_page_ancestor could be introduced in a future revision of the theme.
was that it would be great if Atahualpa could automatically do that based on the style we chose for the parent item, without having to use CSS inserts.
We would define the "parent" CSS in WP and current-menu-ancestor would be used to apply that style to the parent elements at every level.


Regarding the bug you mention, I'm not experiencing it with the ata theme.
Here is my hierarchy:
A
-B
A
-B
-B
--C
--C
-B
A
A

And here are the classes I have (minus the menu/page-item-xxx):
Level A item, parent of level B and level C items
Code:
rMenu-expand menu-item menu-item-type-post_type current-menu-ancestor current_page_ancestor
Level B
Code:
menu-item menu-item-type-post_type
Level B item, parent of level C item
Code:
rMenu-expand menu-item menu-item-type-post_type current-menu-ancestor current-menu-parent current_page_parent current_page_ancestor
Level C item selected
Code:
menu-item menu-item-type-post_type current-menu-item page_item current_page_item

"current-menu-parent" cannot be used in this case, because it doesn't exist in level A.
"current-menu-ancestor" is placed exactly where it should and can be used to highlight the parents of the selected item.

The "problem" I'm having now is that Atahualpa highlights every sub-element of a chosen menu item using what we've defined in WP as the parent style and the same happens when using inserts for current-menu-ancestor. But I guess that's more of a CSS problem.
  #9  
Old Aug 8, 2010, 06:44 AM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
Quote:
The "problem" I'm having now is that Atahualpa highlights every sub-element of a chosen menu item using what we've defined in WP as the parent style and the same happens when using inserts for current-menu-ancestor. But I guess that's more of a CSS problem.
It's not a CSS problem, it is the way CSS works (the C stands for cascading) when ever you set a style to an element, all the sub elements under it get that style unless they have their own style. When you start dealing with menus, it gets complicated which is why there are more than 400 lines of CSS dealing with the Atahualpa menu structure.

Now suddenly WP has added a whole new set of classes to the mix and the ability to mix categories and pages and outside links together. Atahualpa was build where pages were in the page menu and categories are in the category menu.

but now they can be mixes and this is going to lead to issues.

here is an example. I set a page parent to have the color red, I set a category parent to have the color blue. I create a wp menu with a page and add a sub menu item which is a category. if I click on the category, should the parent be red or blue?

The new wp menu structure has added a whole new class of questions and issues (and WP bugs) HOWEVER, you can code CSS Inserts to structure and set the colors anyway you want. And maybe some day Atahualpa will give the tools to do it in a theme option, who knows.
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #10  
Old Aug 8, 2010, 09:46 AM
interfasys
 
46 posts · Aug 2010
Switzerland
That's what I meant . The classes are in place, I "just" have to manually restyle the entire menu myself.
Is there a way to turn off the Atahualpa menu CSS?
  #11  
Old Aug 8, 2010, 09:55 AM
juggledad's Avatar
juggledad
 
23,765 posts · Mar 2009
OSX 10.11.5 WP 4.x Atahualpa(all) Safari, Firefox, Chrome
Well you could go into CSS.php and remove all the code relating to menus
__________________
"Tell me and I forget, teach me and I may remember, involve me and I learn." - Benjamin Franklin
Juggledad | Forum Moderator/Support
  #12  
Old Aug 8, 2010, 09:58 AM
interfasys
 
46 posts · Aug 2010
Switzerland
I'll check it out. Thank you.

Bookmarks



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] Is it possible to keep the PARENT page highlighted in the menu? qda Page & Category Menu Bars 46 Mar 17, 2012 07:02 PM
How to turn link of pages in page menu on or off e.g. turn parent off & child on Deansta22 Page & Category Menu Bars 8 Jan 18, 2011 03:01 PM
Subpages are all highlighted when parent page is selected on page menu bar danielphenry Page & Category Menu Bars 9 Feb 27, 2010 02:34 AM
Child pages don't keep parent page in menu highlighted ribbu Page & Category Menu Bars 12 Dec 15, 2009 01:43 PM
How to make the Pages display in sidebar, show only the Parent Main Pages Leoni Sidebars & Widgets 2 May 27, 2009 01:13 AM


All times are GMT -6. The time now is 11:50 PM.


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