Highlight Current Page Only in Meall Dubh’s Fold Page Menu Widget

I have always loved Meall Dubh’s Fold Page Menu Plug-in.  For many complex projects, it is a great way to keep menu’s fairly well controlled.  Even better, he has now made it into a Fold Page Menu Widget. I can also confirm that it works fine through WP version 3.0.2 that was recently released.  Unfortunately (you listening here Meall?) it has always been offered in a .tgz (tar zipped) file instead of the more common zip format.  That aside, you can use the free sourceforge, 7-zip to extract the files if necessary.

I found that I wanted my current page to be highlighted in the fold out page menu and that was just a little problematic because my first attempts also highlighted any child pages.  Of course I soon realized why,  I was working on the ID current_page_item.  Because it was an li, the sub-lists were thus also included.  The fix was to use the following:

#folded-pages li.current_page_item > a{
color:#82FFFF;
}

The “>” makes only the top level menu items respond and not the sub-list items.

Problem solved.  I looked for a while before it dawned on me.  At first I was thinking it was an inheritance issue and I wasn’t making much progress.  The I realized all sub-lists were simply part of the existing list and thus included.

This entry was posted in WordPress Tips. Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *