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.

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?

share|improve this question

1 Answer 1

up vote 1 down vote accepted

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.

share|improve this answer

Your Answer

 
discard

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

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