• Resolved knguyengoe

    (@knguyengoe)


    I’m trying to get a custom post type to display like a page instead of a post but I can’t figure out why it isn’t working. Please help! I have this in my functions.php:

    register_post_type( 'knowledge-base',
    		array(
    			'labels' => array(
    				'name' => __( 'Knowledge Base' ),
    				'singular_name' => __( 'Knowledge Base' )
    			),
    			'public' => true,
    			'has_archive' => true,
    			'rewrite' => array('slug' => 'knowledge-base'),
    		    'capability_type' => 'page',
    		    'hierarchical' => true,
                'supports' => array(
    		'page-attributes',
    		'title',
    		'editor',
    		'revisions',
    	),
    			
    		)
    	);
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Custom post type displaying as “post” instead of “page”’ is closed to new replies.