• 0
Sign in to follow this  
Followers 0

How to select sidebar widget menu item while on a subpage?

Question

Posted · Report post

Hello, I've managed to bold a text widget menu item in the side bar when the current page is active using this: ` .widget ul li.current_page_item a { color: #000000; font-weight: bold; } ` as on this main FAQ page: http://bit.ly/phKXV9 However, when I am a single FAQ subpage - e.g. http://bit.ly/nw9pIG - the main FAQ page menu item in the sidebar widget gets de-selected. Which selector should I use to make sure that the main FAQ page menu item in the sidebar widget remains blackened and bolded when I am on any of the FAQ subpages? Thanks, Robert

Share this post


Link to post
Share on other sites

5 answers to this question

  • 0

Posted · Report post

sorry but what Item should be highlighted when you are on the sub page? so i know what to look for

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Hello Adam, When you go to the main FAQ page at http://bit.ly/phKXV9, you will see that one of the sidebar menu links on the left is blackened and bolded - this is the main FAQ page which list all the questions as you can see. However, when you click on any of the questions - e.g. http://bit.ly/nw9pIG - you will see that the main FAQ page link in the sidebar menu is no longer highlighted. In short, I'd like to keep the main FAQ page link in the sidebar menu on the left highlighted for every FAQ answer page (that are actually sub-pages to the FAQ category pages which are sub-pages to the main FAQ page): FAQ main page - FAQ category 1 -- FAQ answer 1 -- FAQ answer 2 ... - FAQ category 2 ... etc. In other words, I am trying to be able to select the main FAQ page link in the sidebar menu on the left from any of the sub- and sub-sub- pages below so that it remains highlighted for all sub-pages. Hope this helps. Thanks, Robert

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

you will see that the main FAQ page link in the sidebar menu is no longer highlighted.
Since this main FAQ page link isn't in the sidebar menu, it can't be highlighted. I don't see it in the menu when I go here: http://bit.ly/nw9pIG Or maybe I am misunderstanding and thinking that you want the main FAQ page link put in there...

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Hi Catrina, When you go to http://bit.ly/nw9pIG,'>http://bit.ly/nw9pIG, the main FAQ page link is the 3rd one from the bottom in the sidebar menu (it's called: "Najczestsze pytania") - at this moment it's not highlighted because I don't know which selector to use while on a sub-page. And this is where I need your help? I can easily get it highlighted when I am on the main FAQ age using `.widget ul li.current_page_item a` selector. The whole question is how to keep it highlighted when you are on the sub-page (e.g. http://bit.ly/nw9pIG) - which selector should I use? Thnx, Robert

Share this post


Link to post
Share on other sites
  • 0

Posted · Report post

Hello everyone, I've done it! After many attempts I have finally found the selector that will keep your parent page link in the sidebar widget menu highlighted on any of the subpages: ` .widget ul li.current-page-ancestor a, .widget ul li.current_page_item a, .widget ul li.current-page-ancestor ul a, .widget ul li.current_page_item ul a { color: #000000; font-weight: bold; } ` Just sharing this with everyone in case anyone else has a similar problem. Robert

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0