• Resolved suhailsulu

    (@suhailsulu)


    I want to create multiple custom post in my website, but i can see only one custom post in my admin panel.
    the code for adding custom post in my functions.php is

    function create_my_custom_posts() {
    	register_post_type( 'career_post', array(
    		'labels' => array(
    			'name' => __( 'Careers' ),
    			'singular_name' => __( 'Career' ),
    			'add_new' => __( 'Add New' ),
    			'add_new_item' => __( 'Add New Career' ),
    			'new_item' => __( 'New Career' ),
    			'view_item' => __( 'View Career' ),
    			'search_items' => __( 'Search Careers' ),
    			'all_items' => __( 'All Careers' ),
    			'add_new_item' => __( 'Add New Career' ),
    			'not_found' => __( 'No Openings Yet' )
    		),
    		'description' => 'job openings in uvionics tech',
    		'public' => true,
    		'has_archive' => true,
    		'menu_position' => 10
    			)
    	);
    
    	register_post_type( 'employees_comnts_post', array(
    		'labels' => array(
    			'name' => __( 'EmpsComnts' ),
    			'singular_name' => __( 'EmpComnt' ),
    			'add_new' => __( 'Add New' ),
    			'add_new_item' => __( 'Add New Comnt' ),
    			'new_item' => __( 'New Comnt' ),
    			'view_item' => __( 'View Comnt' ),
    			'search_items' => __( 'Search Comnts' ),
    			'all_items' => __( 'All Comnts' ),
    			'add_new_item' => __( 'Add New Comnt' ),
    			'not_found' => __( 'No Comnts Yet' )
    		),
    		'description' => 'Employees comments about life in uvionicstech',
    		'public' => true,
    		'has_archive' => true,
    		'menu_position' => 5
    			)
    	);
    	flush_rewrite_rules( false );
    }
    add_action( 'init', 'create_my_custom_posts' );
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)

The topic ‘cant add multiple custom post’ is closed to new replies.