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.

This question is a little hard to explain but i will try to be as clear as i can:

I have a custom theme that i am presently working on, within this theme i have added a top level menu in wp-admin with 5 submenus below it.

In one of these submenus i wish to add custom post types where admin user can create and edit posts and not have to go through the default WP process of Posts >> Add New.

The reason i want to do it this way is that the custom post types will contain hooks to include certain calls to an API (user tokens, keys, xml etc) and i want to avoid the confusion of the end user creating posts away from what are to be core functions of my theme.

At present i have no code worked out, (im not asking for it either) as you may understand googling on the lines of "custom post types admin menu" etc just throws back all sorts of irrelevance, do any of you gurus have a pointer where i can get a heads up on how to implement this?.

Regards Martin

share|improve this question
add comment

1 Answer 1

up vote 1 down vote accepted

Register the post type without a UI ('show_ui'=>false), then you will have to to create a form on your submenu page(s) and one or more handlers for those forms. wp_insert_post/wp_update_post can handle the post insertion if you give them the right information. Based on the information available, that is the best I've got.

For a custom post type, you'd never go to "Posts >> Add New", though. You'd go to "CPT-Name >> Add New". They are distinct menus.

share|improve this answer
    
thanks for the answer, was over a year ago since i last meddled with WP and post types, thanks for the correction too regarding CPT's.. much appreciated –  MartinJJ Dec 11 '12 at 16:15
    
should this 'show_GUI'=>false be 'show_ui'=>false as i cant find reference in codex register post type to 'show_GUI'=>false thanks –  MartinJJ Dec 11 '12 at 16:19
1  
Sorry, yes. That should be show_ui. –  s_ha_dum Dec 11 '12 at 16:23
    
thanks for the clarification –  MartinJJ Dec 11 '12 at 16:44
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.