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 had a theme in 3.0b2 that was registering custom post types and displaying them in the admin menu just fine -- after upgrading to 3.1.2, they no longer appear in the sidebar admin menu (although they do get queried properly from the theme pages for the non-admin portions of the site). show_ui is set to true and adding show_in_menu as true for good measure had no effect. Can anyone help?

function balmer_init() {

//print ("Here");

register_post_type('gig', array(
    'label' => __('Gigs'),
    'singular_label' => __('Gig'),
    'public' => true,
    'show_ui' => true,
    '_builtin' => true,
    '_edit_link' => 'post.php?post=%d',
    'capability_type' => 'post',
    'hierarchical' => false,
    'rewrite' => false,
    'query_var' => false,
    'supports' => array('title', 'editor',/* 'custom-fields' */),
    'register_meta_box_cb' => 'gig_callback',
));
}

add_action("init","balmer_init");

Thanks!

share|improve this question
add comment

1 Answer

up vote 2 down vote accepted

Remove the errors in your registering function:

  • 'Gigs' is not part of the default language file. Either add your text domain as second parameter or drop the translation function.
  • '_builtin' => true is wrong. Remove the parameter; it is for native post types only.
  • 'supports' => array('title', 'editor',/* 'custom-fields' */), – the comma after editor is a syntax error. Turn debugging on to see such errors.
share|improve this answer
add comment

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.