WordPress.org

Ready to get started?Download WordPress

Forums

Hide register_post_type in dashboard menu (1 post)

  1. jamesdfulton
    Member
    Posted 2 years ago #

    Hi,

    I'm creating a bunch of register_post_type's but only want 1 to show for the author role. All will still show for the admin role. Any help would be great.

    register_post_type('products', array(
    		'label'=>'Products',
    		'public'=>True,
    		'show_ui'=>true,
    		'show_in_menu'=>true,
    		'menu_position'=>30,
    		'supports'=>array('title', 'author'),
    		'register_meta_box_cb'=>'motive_add_products_meta_box',
    	));
    
    	register_post_type('treatments', array(
    		'label'=>'Treatments',
    		'public'=>True,
    		'show_ui'=>true,
    		'show_in_menu'=>true,
    		'menu_position'=>30,
    		'supports'=>array('title', 'editor'),
    		'register_meta_box_cb'=>'motive_add_treatments_meta_box',
    	));
    
    	register_post_type('questions', array(
    		'label'=>'Questions',
    		'public'=>True,
    		'show_ui'=>true,
    		'show_in_menu'=>true,
    		'menu_position'=>30,
    		'supports'=>array('title', 'editor'),
    		'register_meta_box_cb'=>'motive_add_questions_meta_box',
    	));

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.