0

I want to show more custom post types in the admin area, but when I increase the number of posts by adding a number in the screen options and click apply, nothing happens. However, this works with the normal posts.

My code for my custom post:

// Register Post Type    
add_action( 'init', 'create_tests_type' );
function create_tests_type() {
    $labels = array(
        'name'               => _x( 'Test', 'post type general name' ),
        'singular_name'      => _x( 'Test', 'post type singular name' ),
        'add_new'            => _x( 'Add New', 'book' ),
        'add_new_item'       => __( 'Add New Test' ),
        'edit_item'          => __( 'Edit Tests' ),
        'new_item'           => __( 'New Tests' ),
        'all_items'          => __( 'All Tests' ),
        'view_item'          => __( 'View Test' ),
        'search_items'       => __( 'Search Tests' ),
        'not_found'          => __( 'No Tests found' ),
        'not_found_in_trash' => __( 'No Tests found in the Trash' ), 
        'parent_item_colon'  => '',
        'menu_name'          => 'Tests'
    );
    $args = array(
        'labels'        => $labels,
        'description'   => 'Holds our Tests data',
        'public'        => true,
        'menu_position' => 5,
        'supports'      => array( 'title', 'editor', 'thumbnail', 'excerpt', 'comments' ),
        'has_archive'   => true,
    );
    register_post_type( 'test', $args );    
}

I've searched a lot to solve this but haven't found the right solution.

1

I used your code and I wasn't able to re-create the error - it seems to be working correctly for me on a fresh 3.5.1 install.

Does this also apply to your other screen options, specifically the checkboxes for columns to display (comments or dates) ?

If applicable, try deactivating your plugins and seeing if that clears up the issue - this is the only thing I can offer for the moment.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.