Been searching for a while on this subject without any success. All I can find are solutions which involve using the Walker property of the wp_nav_menu, which I don’t think is the right approach. I want to create a menu with the following structure:
-
Link that is a category
- X numbers of submenu items which are posts belonging to the parent
category
- X numbers of submenu items which are posts belonging to the parent
And so on…
Do I need to manually run a loop for each menu item to retrieve the posts?
Try this in your functions.php: