46

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 :-/

2 Answers 2

114

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!

5
  • 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 ;) Commented Jan 3, 2012 at 21:33
  • 13
    Point "2" was what i was looking for
    – Alex K
    Commented Oct 17, 2016 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
    Commented Nov 30, 2018 at 23:00
  • @thanks sir, your help is really solved my problem using the just screen option at top of the menu page. Commented Feb 2, 2019 at 12:22
  • Saved me so much time. I was about to create loops for each drop-down etc... Always gotta remember that screen-options! Commented Aug 30, 2019 at 23:32
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.

2
  • This might be really handy at a late point. Thank you :) Commented Jan 3, 2012 at 21:37
  • 1
    wow. I've been wanting this functionality for a while.
    – Norcross
    Commented Jan 25, 2012 at 2:31

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.