I am building a multilingual site with Polylang, and need to add custom class to my menus that uses Polylang’s groups.
For example, I have a Page “Happy” and it has a translated Page “Gelukkig” in Dutch. Polylang allows me to have different versions of the menu for each language, but I need that a common class is added to the link to the “Happy” / “Gelukkig” / … menu element. (I will use that class to add an image before the text.)
Looking at the docs I find
.menu-item-object-category
This class is added to menu items that correspond to a category.
.menu-item-object-tag
This class is added to menu items that correspond to a tag.
But categories and tags are only available for Posts as far as I understand, so what can I use for Pages.
The topic ‘Use Polylang groupings in wp_nav_menu’ is closed to new replies.