• Hi, in my general post, the screen options has custom field but in my custom post’s screen options doesn’t have it…

    this is my custom post

    add_action('init', 'myfaq_post_type');
    function myfaq_post_type()
    {
    	$labels = array(
    		'name' => _x('Articles', 'post type general name', 'azurethemes'),
    		'singular_name' => _x('Articles', 'post type singular name', 'azurethemes'),
    		'add_new' => _x('Add New', 'Articles', 'mythemes'),
    		'add_new_item' => __('Add New Articles', 'azurethemes'),
    		'edit_item' => __('Edit Articles', 'mythemes'),
    		'new_item' => __('New Articles', 'mythemes'),
    		'all_items' => __('All Articles', 'mythemes'),
    		'view_item' => __('View Articles', 'mythemes'),
    		'search_items' => __('Search Articles', 'mythemes'),
    		'not_found' =>  __('No Articles Found', 'mythemes'),
    		'not_found_in_trash' => __('No Articles Found in Trash', 'mythemes'),
    		'parent_item_colon' => ''
    	);
    
    	$args = array(
    		'labels' => $labels,
    		'public' => true,
    		'show_ui' => true,
    		'capability_type' => 'post',
    		'hierarchical' => false,
    		'rewrite' => array('slug' => 'myfaq-view', 'with_front' => true),
    		'query_var' => true,
    		'show_in_nav_menus'=> false,
    		'supports' => array('title', 'editor', 'page-attributes')
    	);
    
    	register_post_type( 'myfaq' , $args );
    
    	register_taxonomy('faq-category',
    		array('myfaq'),
    		array(
    		'hierarchical' => true,
    		'label' => 'Articles Categories',
    		'singular_label' => 'Articles Categories',
    		'rewrite' => true,
    		'query_var' => true
    	));
    }

    how can I tweak it so that the screen option values of the general post will be same in my custom post?

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘How to add screen options values in a custom post’ is closed to new replies.