I realize that one can add custom links through the menu manager but is there a way to manually create such components through the functions.php file?

More specifically, one example here relates to a situation I currently have where I created a custom post type for "events" meaning all associating posts show up like domain.com/events/events-name-abc/ and where the main events page domain.com/events/ is just defined through a custom post type template. As such, when using the admin menu manager interface there is no way for a user to see this main "events" page as an option to add to his menu.

Ideally, I am looking for some example code I can add to my functions.php file which would allow me to define/code in such items manually (with the optional ability to pre-defining custom attributes like a predefined class) and have any of these elements automatically added as options to any of the menu manager meta-boxes or places into a custom meta-box.

Any plugins or code anyone is aware of which extend the menu manager to allow for such functionality?

1 Answer 1


When you made a custom post type, you might be have template file for it too, i.e. template-events.php. Then you could make a page titled events, with events slug and set the template to template-events.

After you got an events page, there's must be an Events option on your menu manager.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.