Jump to content

Setting Menu List Item Class in WordPress


tonsils

Recommended Posts

Hi,

 

I am using WordPress and have created a menu system with the following setup that I have placed in my sidebar.php file

            
  <ul id="menu_sys">          
       <li><a href="a.php" class="currentM">Option A</a></li>
       <li><a href="b.php" class="">Option B</a></li>
  </ul>

 

My question is, at startup, my menu Option A is my current active menu, which is all great. But when I press on menu Option B, how can I pass into b.php or just setup in b.php, to now make menu Option B my current active menu, i.e. I need to set the class for Option B to current but unsure how to do this in PHP.

 

Would really appreciate some help as I'm working on a project that is due really soon.

 

Thanks.

TT.

 

ps I don't want to use wp_list_pages() function as it doesn't cater for my needs.

 

 

 

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.