26

I need a way of adding custom post types to the "Appearance-->Menus" option in Wordpress. i have created a custom post type with:

register_post_type('produksjoner',$args);

All examples I find just add the pages to the menu by manually adding the URL into a custom menu item. I want it to be able to add this automatically by choosing it like any other page.

I have been searching for two days now... please help me :-/

74

To get your custom post types to show up in Appearance -> Menus, you need to do two things:

  1. Check your arguments and make sure that show_in_nav_menus is set to true.

  2. Go to the Appearance -> Menus page and at the very top, click on Screen Options. In the panel that opens, make sure that your custom post types are checked.

That's all!

  • Wow thank you! That was easier than i thought. When I can't find an answer fast, it's probably because it's really simple and few others have the same problem ;) – Ole Henrik Skogstrøm Jan 3 '12 at 21:33
  • 5
    Point "2" was what i was looking for – Alex K Oct 17 '16 at 19:59
  • Unfortunately, at least with the theme I'm using (bridge), the child types don't light up this menu item as a sub-page of the archive page, which is why I was looking for a built-in way in the first case. Its possible to access it with css though by hooking into the cpt class on the body tag and the class on the menu item. – rtpHarry Nov 30 '18 at 23:00
  • @thanks sir, your help is really solved my problem using the just screen option at top of the menu page. – Bhavin Thummar Feb 2 at 12:22
4

I came across this same situation where I needed dynamic menus for my Custom Post Type Archive pages to show up in the Menu editor.

You can try my CPT Archive to Nav plugin and see if that gives you what you want. http://wordpress.org/extend/plugins/cpt-archive-to-nav/ You have to click on the "Screen Options" menu at the top of the page, and then select the requested CPT's to be displayed on the screen. Then in the "View All" tab of the post type and the top selection should be the archive page.

This just masks it to be a custom menu item type instead of having to manually enter it in to create the menu. Currently there is not a way to create a new menu item type other than what is already available to you.

  • This might be really handy at a late point. Thank you :) – Ole Henrik Skogstrøm Jan 3 '12 at 21:37
  • 1
    wow. I've been wanting this functionality for a while. – Norcross Jan 25 '12 at 2:31

Your Answer

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

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