WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have created a custom post type and registered it using this code

$labels = array(
  'name' => __( 'Portfolio' ),
  'singular_name' => __( 'Portfolio' )

$args = array(
  'labels' => $labels,
  'public' => true,
  'exclude_from_search' => false, 
  'publicly_queryable' => true,
  'show_ui' => true, 
  'query_var' => true,
  'capability_type' => 'post',
  'hierarchical' => false,
  'menu_position' => null,
  'supports' => array('title','editor','thumbnail','custom-fields', 'page-attributes', 'excerpt', 'revisions'),
  'show_in_nav_menu' => true

I can create a portfolio post type and save it. It all works as expected until I go to Appearance > Menus where I can add the portfolio to the menu but it wont show up in the index template using this code


All the other menu items show properly just not the custom post types. If you look at the screenshot, all that is shown in the front end is 'Shortcodes' link and 'BBC' link (so page and custom link - not portfolio link)

Help! I need those links in there.

Screenshot of Appearance > Menus here


share|improve this question

Add a s to show_in_nav_menu : show_in_nav_menus

share|improve this answer
soju, I was very excited when I saw this and tried it. I deleted all the posts and started again with this in. No change. Still nothing. – sl1nky Apr 18 '12 at 11:00

First you need to add the following to your $arg array

'rewrite' => array('slug' => 'portfolio')

Then you will need to create a page in wordpress admin called 'Portfolio' or any other title but as long as the page slug is 'portfolio'. Publish it.

Then go to the Appearance>Menus and add the page to your menu. Go to the frontend and go to the link in your menu and if you have any posts there you'll see a list of them - otherwise it will say that nothing has been found.

share|improve this answer

Your Answer


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.