• I’ve found a few examples of how to create custom post types but I’ve not managed to get them to work e.g from here

    https://justintadlock.com/archives/2010/04/29/custom-post-types-in-wordpress

    The problem is capability_type. If I comment it out everything works; if I leave it there the labels disappear.

    What on earth am I doing wrong? I’ve stripped the code down to the bare minimum.

    add_action( 'init', 'create_my_post_types' );
    
    function create_my_post_types() {
    	register_post_type( 'super_duper',
    		array(
    			'labels' => array(
    				'name' => __( 'Super Dupers' ),
    				'singular_name' => __( 'Super Duper' )
    			),
    			'public' => true,
    	'capability_type' => 'super_duper',
    
    		)
    	);
    }
Viewing 46 replies (of 46 total)
Viewing 46 replies (of 46 total)
  • The topic ‘Anyone managed to get custom post types capabilities working?’ is closed to new replies.