How to generate menu of categories with li class category ID (1 post)

  1. abmirayo
    Posted 2 years ago #

    Hi everyone!

    I've been doing research about this but I'm stuck and I can't figure out a clean solution. Right now I have a menu with items that link to categories. This menu has LI elements, and for example, the elements have classes such as menu-item-XX, being XX an ID that is assigned to them by WordPress. I would like to generate this menu in order for the LI's also to have a class such as 'category-XX' being the XX the category ID of such category. I think I can do it with a custom Walker, but I don't know exactly how. Any ideas?

    Thanks so much,


Topic Closed

This topic has been closed to new replies.

About this Topic