Automatically Add a default category to a Custom Post Type before save_post action

the hooks “save_post…” are called too when a new post is created then you can set default values with that $customPostType = “customTypeCode”; add_action(“save_post_$customPostType”, function ($post_ID, $post, $update) { if (!$update) { // new item // place to set default values return; } // updating a existing item // … }, 10, 3);

Support for author does not show author column in post table in dashboard

Instead of changing all the columns just add and remove the columns that you want. add_filter( ‘manage_edit-listing_columns’, ‘et_listing_edit_columns’ ); function et_listing_edit_columns( $columns ) { $columns[‘et_listing_type’] = __( ‘Type’, ‘Explorable’ ); $columns[‘et_listing_location’] = __( ‘Location’, ‘Explorable’ ); // You can remove columns with unset() return $columns; }

Issue with Custom Post Types and Permalinks

I don’t recommend using category as cpt try rename it for example in product-type. For more information on category see on codex: Taxonomies function my_custom_post_product_type() { $labels = array( ‘name’ => _x( ‘Product Types’ ), ‘singular_name’ => _x( ‘Product Type’ ), ‘add_new’ => _x( ‘Add New’ ), ‘add_new_item’ => __( ‘Add New Product Type’ ), … Read more