Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

In case of menus that contain items other than pages, such as custom post types, posts, posts of a certain category, etc. How can I make wordpress to automatically (programatically) add a new item to the menu when that new item is just created?

I don't want users to manually add this new item in Appearance -> Menus ...

Should I use the fallback_cb of wp_nav_menu()?

I need to use that for a custom post type and for posts of category:restaurant for example. I am also interested in being able to highlight the current visited item.

Thanks in advance.

share|improve this question

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.