I recently found out that in WordPress there is an option to add custom descriptions to menu items. This looks nice but there’s no default way to display these descriptions at the front-end.
In my new theme, I thought it would be nice to display the webshop categories / menu-items using a custom description. Online I’ve found some snippets but none seems to work well. Hereby I share my solution with you.
First, enter the WordPress back-end at Appearance >Menus. Next click in the top right corner the ‘Screen Options‘ button. Finally select the descriptions box, as shown here.
When opening an menu-item a description input field is visible now. You only have to add a description and save the menu.
Finally, add the following snippet to your functions.php
All that is left to do is styling the menu and the description to your choice. Have fun!