I need a menu that features (in that order): index page, a custom page, first post category page, second post category page, and another custom page.

I can’t understand how to do it with wordpress functions, so I just did links with static href attributes, as following: /, /some-page, /category/foo, /category/bar, /another-page.

This works, but now I can’t (or don’t know how to) add an active class to the menu item corresponding to the current page.

Also, I would like the active class to apply to the menu item corresponding to the category of the post when displaying a single post, i.e. if I click on a post from category foo, active class should still be applied to the menu item going to /category/foo.

Could you tell me whether there exist a proper way to do this?

Read more here: How to create a menu with pages and post categories?


Solution:

If you know the solution of this issue, please leave us a reply in Comment section, to update the question.


Wordpress related questions and answers: