• Resolved veggie_89

    (@veggie_89)


    Do I need to add a support to my custom post type to get the type dropdown to show up in the batch editor? This would be a really helpful tool if I could use it on custom post types.

Viewing 3 replies - 1 through 3 (of 3 total)
  • Are you using Admin Columns Pro? If so, edit the columns and add default ‘Type’ column. It won’t show in the overview, but is needed for the quick/bulk edit options.

    @veggie_89 Just checked some of my custom post types and bulk editing shows the post type selector. Below is a copy of the code I use for my own custom post types. Maybe you can compare and see what you might be missing.

    function cpt_testpages() {

    /**
    * Post Type: Testing.
    */

    $labels = array(
    "name" => __( "Testing", "astra" ),
    "singular_name" => __( "Test Page", "astra" ),
    "parent_item_colon" => __("Parent Item:" ),
    );

    $args = array(
    "label" => __( "Testing", "astra" ),
    "labels" => $labels,
    "description" => "",
    "public" => true,
    "publicly_queryable" => true,
    "show_ui" => true,
    "show_in_rest" => false,
    "rest_base" => "",
    "has_archive" => false,
    "show_in_menu" => 'site-pages',
    "show_in_nav_menus" => true,
    "exclude_from_search" => true,
    "capability_type" => "post",
    "map_meta_cap" => true,
    "hierarchical" => true,
    "rewrite" => array( "slug" => "testing", "with_front" => true ),
    "query_var" => true,
    "menu_position" => 20,
    "supports" => array( "title", "editor", "thumbnail", "excerpt", "custom-fields", "comments", "revisions", "author", "page-attributes", "post-formats" ),
    );

    register_post_type( "cwgtestpages", $args );
    }

    add_action( 'init', 'cpt_testpages',1 );
    Thread Starter veggie_89

    (@veggie_89)

    Thanks @stenpms72 That was the issue!

    And thanks @crazywpgeek for sharing.

Viewing 3 replies - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.