I'm looking for a way to make a menu that contains all categories and when an author has 1 or more post in said category they appear in the dropdown for that category, the links could look like this:

*category 1*    /classes/category-1
    *author1*    /classes/category-1?author_name=author1
    *author2*    /classes/category-1?author_name=author2

*category 2*    /classes/category-2
    *author1*    /classes/category-2?author_name=author1
    *author3*    /classes/category-2?author_name=author3

*category 3*    /classes/category-3
    *author1*    /classes/category-3?author_name=author1
    *author2*    /classes/category-3?author_name=author2
    *author3*    /classes/category-3?author_name=author3

I can't seem to find a plugin that does this and I have no clue how to customise Wordpress.
I understand HTML and (basic) procedural PHP, but that doesn't really seem to help. I've attempted to follow functions back but I can never work out what's going on.

I did find that I can use wp_create_nav_menu() to create a menu, but I have no idea where to put it to make it run and how to make it automatic

The menu would just be placed in a menu slot in my theme.

Is anyone able to suggest a way to do this or where to get started.

Thanks :)

WP-version: 4.4.1
Theme: https://wordpress.org/themes/sparkling/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.