Ecommerce Shopify WordPress Discussion

WordPress custom post type enable post-new.php?post_type=my_custom_template

I register a custom post type, how to enable the add new page? In the link below, it shows an error 'Invalid post type. /wp-admin/post-new.php?post_type=abc_template public function create_dynamic_page_post_type() { $labels = array( 'name' => _x( 'Templates', 'post type general name', 'custom_post_type' ), 'singular_name' => _x( 'Template', 'post type singular name', 'custom_post_type' ), 'menu_name' => _x( 'Templates', 'admin menu', 'custom_post_type' ), 'name_admin_bar' => _x( 'Template', 'add new on admin bar', 'custom_post_type' ), 'add_new' => _x( 'Add New', 'Template', 'custom_post_type' ), 'add_new_item' => __( 'Add New Template', 'custom_post_type' ), 'new_item' => __( 'New Template', 'custom_post_type' ), 'edit_item' => __( 'Edit Template', 'custom_post_type' ), 'view_item' => __( 'View Template', 'custom_post_type' ), 'all_items' => __( 'All Templates', 'custom_post_type' ), 'search_items' => __( 'Search Templates', 'custom_post_type' ), 'parent_item_colon' => __( 'Parent Templates:', 'custom_post_type' ), 'not_found' => __( 'No Templates found.', 'custom_post_type' ), 'not_found_in_trash' => __( 'No Templates found in Trash.', 'custom_post_type' ) ); $args = array( 'labels' => $labels, 'public' => true, 'publicly_queryable' => true, 'show_ui' => true, 'show_in_menu' => true, 'query_var' => true, 'rewrite' => array( 'slug' => 'abc_template' ), // Replace 'custom-post' with your desired slug 'capability_type' => 'post', 'capabilities' => array( 'create_posts' => true ), 'has_archive' => true, 'show_in_rest' => true, 'hierarchical' => false, 'menu_position' => null, 'supports' => array( 'title', 'editor', 'author', 'thumbnail', 'excerpt', 'comments' ), ); register_post_type( 'abc_template', $args ); } Thanks added show_ui = true, capabilities
TurboCommerce make the better internet purchasing globaly

Turbo Multi-language Translator

Make the better internet purchasing globaly

Turbosify SEO Speed Booster

5.0 (7) Free plan available
Get better conversions by improving store loading speed Installed

Turbo Multi-language Chat - AI Customer service in one hand

TurboCommerce make the better internet purchasing globaly
Our products

The help you need, when you need it

App by Turbo Engine

3 apps • 5.0 average rating

Turbosify Speed Booster

5.0 (7)
Get better conversions by optimizing shopify store Google page speed Installed

Turbosify Translator for Wordpress Woocommerce

5.0 (74) Free Wordpress Woocommerce Plugin
Translate your wordpress website to multiple language within 1 click, no configuration needed, no No technical required

Grow your business here

Whether you want to sell products down the street or around the world, we have all the tools you need.