Support

Account

Home Forums Backend Issues (wp-admin) Particular Custom Post Type Rules for a group of fields Reply To: Particular Custom Post Type Rules for a group of fields

  • Hi Elliot and thank you for you response.

    Here is how I vahe registered my CPT :

    function custom_post_type2() {
    
    	$labels = array(
    		'name'                => _x( 'Products', 'Post Type General Name', 'twentythirteen' ),
    		'singular_name'       => _x( 'Product', 'Post Type Singular Name', 'twentythirteen' ),
    		'menu_name'           => __( 'Products', 'twentythirteen' ),
    		'parent_item_colon'   => __( 'Parent Product:', 'twentythirteen' ),
    		'all_items'           => __( 'All Products', 'twentythirteen' ),
    		'view_item'           => __( 'View Product', 'twentythirteen' ),
    		'add_new_item'        => __( 'Add New Product', 'twentythirteen' ),
    		'add_new'             => __( 'New Product', 'twentythirteen' ),
    		'edit_item'           => __( 'Edit Product', 'twentythirteen' ),
    		'update_item'         => __( 'Update Product', 'twentythirteen' ),
    		'search_items'        => __( 'Search Products', 'twentythirteen' ),
    		'not_found'           => __( 'No Products found', 'twentythirteen' ),
    		'not_found_in_trash'  => __( 'No Products found in Trash', 'twentythirteen' )
    	);
    	$args = array(
    		'label'               => __( 'product', 'twentythirteen' ),
    		'description'         => __( 'Product Page', 'twentythirteen' ),
    		'labels'              => $labels,
    		'supports'            => array( 'title', 'editor', 'excerpt', 'thumbnail', ),
    		'hierarchical'        => false,
    		'public'              => true,
    		'show_ui'             => true,
    		'show_in_menu'        => true,
    		'show_in_nav_menus'   => true,
    		'show_in_admin_bar'   => true,
    		'menu_position'       => 5,
    		'can_export'          => true,
    		'has_archive'         => true,
    		'exclude_from_search' => false,
    		'publicly_queryable'  => true,
    		'capability_type'     => 'page',
        'rewrite'            	=> array( 'slug' => 'nos-produits' ),
    	);
    	register_post_type( 'product', $args );
    
    }
    
    // Hook into the 'init' action
    add_action( 'init', 'custom_post_type2', 0 );

    In the attached file, you can see what I have. I want to have my custom post type in field 1. and the the different title of my create post in field 2.

    After doing what you say, I still have only what you can see in the attached file in the field 1.

    Thanks a lot for your help.