Viewing 22 posts - 1 through 22 (of 22 total)
  • Author
  • #16830

    It drives me crazy how WordPress assigns classes to ancestor pages, current pages, etc… It really would be nice if there was a plugin or mechanism to force classes to be applied.

    Anyways, I’m using Propulsion and have woocommerce installed. On the main category page, I’ve styled the proper classes for current-menu-parent classes, etc… And that works fine for menus which are generated that look like this:

    <li id=”menu-item-40″ class=”menu-item menu-item-type-post_type menu-item-object-page current-menu-item current_page_item menu-item-40″>Our Products

    The classes are being added and so it can be easily styled. However, it would appear that the “Category” listing is not even adding these classes to the HTML object.

    So the process of my store is:

    Main website –> shop page (which contains categories and has the proper classed) –> Products listing (WHICH DOES NOT ADD THE PROPER CLASSES TO THE HTML) –> Product page (which also works fine and has the classes assigned)

    The Category listing looks like this

    <li id=”menu-item-40″ class=”menu-item menu-item-type-post_type menu-item-object-page menu-item-40″>Our Products

    There is no current-menu-item current_page_item and cannot be styled. Any thoughts???????



    You can add, this is the body classes assigned on woocommerce category archive.




    What would I add that to? I see that the tax-product_cat class is applied to the body tag as well as the archive class, but how can I use this to style the currently selected navigational element?


    Actually it doesn’t help you because the body class affects all menu items. If the menu item itself doesn’t provide an unique class it’s hard to style it in a different way. I’d contact the woocommerce plugin devs and ask them to include a filter function for woocommerce menu items:


    I’ve been back and forth with woocommerce and it’s been determined it’s an issue with the theme. I’ve got twenty eleven installed right now and the class “current_page_parent” is being applied to the product category as expected.

    When it’s the Propulsion theme, this class is not part of the list as noted above. Any ideas?


    I’m keeping up the Twenty Eleven theme for you to see that the current_page_parent is indeed being added to the category page class. Please let me know of a response as I’m waiting to hear back and solve this issue and can switch back to the propulsion theme.


    Hi kork,

    I see what you mean in your example with Twenty Eleven. I’ve tagged both Kriesi and Dude on this to get their input on the issue.





    I asked Kriesi to look into it and to update the menu walker class.




    Thanks guys, it’s most appreciated!



    Actually I am not sure what you mean since the link you provided serves a 404 page for me…

    Also the theme does use the wordpress default menu walker and should generate the same code as twenty 11

    Would you mind setting up the page once again so it doesnt serve a 404 so I can take a look?


    Sorry, didn’t see this until now.

    You can see that there is no class applied to the active menu items

    But the main category page and the product page does have the current class applied: (Purchase code hidden if logged out) -warrior-buckle/

    TwentyEleven theme applies the classes to all of the pages above.




    I tagged this thread for Kriesi.

    Best regards,



    Any update of this?


    Hi kork,

    None that I know of. I’ll see if I can get a word from Kriesi on the issue or if he can post here.




    Thanks Devin



    Since your site is no longer available, I set everything up locally but I am not finding the problem you are describing .

    If you look at the url in the image its structure looks the same as the url you provided above as an example.

    The html of the menu item looks like

    <li id="menu-item-360" class="menu-item menu-item-type-taxonomy menu-item-object-product_cat current-menu-item menu-item-360"><a href="">WordPress Themes</a>




    @nick – The links are still working (as per a few posts above). does NOT contain the current-menu-item class on the active menu with propulsion as the theme, however, the twenty eleven theme does.


    I’m not sure what version of Propulsion you are running but it appears as though this is working correctly now on the demo site which is running version 1.7 of the theme.

    The individual items are showing current_page_parent on the Shop page in the menu which can be used to correctly style the parent “shop” in the menu as active.

    However, even on the WooCommerce demo, when looking at a product category the Shop link does *not* get any class that would highlight it as a parent or current page item. If this is the behavior you are looking for it doesn’t look like its included into the plugin which we wouldn’t be able to modify directly.




    The demo site at: is not working properly.

    There is no current_page_parent class on the menu element on this category page. If you enable the twentyeleven theme, it works as expected.


    I understand that there is not, however the demo themes from WooCommerce do not appear to have this function either which leads me to believe it is either designed this way by the plugin or is a bug within the plugin.

    See the tshirt category on the “Definition” theme from WooThemes here:




    Well I think I’m about to give up. I was told specifically by woothemes after troubleshooting that:

    “This isn’t something specific to WooCommerce rather a side-effect of WordPress Menus and/or the theme you’re using.

    Active categories _should_ have the “current-menu-item” class applied to them. You can see this if you add a category to your main nav and visit it with the TwentyEleven theme.

    I can’t see a category in your sites navigation to check. Could you add one and activate TwentyEleven to see if there’s an issue in your theme.”

    I enabled the twentyeleven theme and it worked perfectly fine and all of the page types had the classes applied to navigational elements. Enable Propulsion and voila, it disappears again.


    Seems we have each side pointing to the other :(

    If it was happening with a WooThemes theme designed for WooCommerce I’d say its a Propulsion issue but it may in fact be something we are both not seeing.

    I’ll tag this for Kriesi again as I believe has contacts with WooThemes and might be able to help bridge the gap on this.



Viewing 22 posts - 1 through 22 (of 22 total)

The topic ‘current-menu-parent specific to woocommerce’ is closed to new replies.