Page VIew
Support › MB Custom Post Type › Page VIewResolved
- This topic has 3 replies, 2 voices, and was last updated 5 years, 6 months ago by
Anh Tran.
-
AuthorPosts
-
October 17, 2019 at 12:26 PM #16562
localroutes
ParticipantI am definitely missing something, here.
Can you please inform me of which CPT option sets up the "View" of the post type?
Or, if it is not an option, how do I get it to assign a URL so the single will be displayed?
Thanks
October 18, 2019 at 2:16 PM #16583Anh Tran
KeymasterHi,
I'm not quite clear about the question. Each post type registered with the plugin is a normal WordPress post type, which uses
single-{$post_type}.php
template file to display (and fallback tosingle.php
. See WordPress docs for more details.The URL for each post in the post type is automatically generated if you set the permalink to something different than the default.
October 18, 2019 at 3:55 PM #16595localroutes
ParticipantHow strange! Neither of my new post types are showing anything about a view URL
See SS http://prntscr.com/pkyzbrfunction your_prefix_register_post_type() { $args = array ( 'label' => esc_html__( 'Dashboards', 'text-domain' ), 'labels' => array( 'menu_name' => esc_html__( 'Dashboards', 'text-domain' ), 'name_admin_bar' => esc_html__( 'Dash', 'text-domain' ), 'add_new' => esc_html__( 'Add new Dash', 'text-domain' ), 'add_new_item' => esc_html__( 'Add new Dash', 'text-domain' ), 'new_item' => esc_html__( 'New Dash', 'text-domain' ), 'edit_item' => esc_html__( 'Edit Dash', 'text-domain' ), 'view_item' => esc_html__( 'View Dash', 'text-domain' ), 'update_item' => esc_html__( 'Update Dash', 'text-domain' ), 'all_items' => esc_html__( 'All Dashboards', 'text-domain' ), 'search_items' => esc_html__( 'Search Dashboards', 'text-domain' ), 'parent_item_colon' => esc_html__( 'Parent Dashboard', 'text-domain' ), 'not_found' => esc_html__( 'No Dashboards found', 'text-domain' ), 'not_found_in_trash' => esc_html__( 'No Dashboards found in Trash', 'text-domain' ), 'name' => esc_html__( 'Dashboards', 'text-domain' ), 'singular_name' => esc_html__( 'Dash', 'text-domain' ), ), 'public' => true, 'description' => 'Give members front and center control over their directory information.', 'exclude_from_search' => false, 'publicly_queryable' => false, 'show_ui' => true, 'show_in_nav_menus' => true, 'show_in_menu' => true, 'show_in_admin_bar' => false, 'show_in_rest' => false, 'menu_icon' => 'dashicons-admin-collapse', 'capability_type' => 'post', 'hierarchical' => false, 'has_archive' => 'all-dashboards', 'query_var' => false, 'can_export' => true, 'menu_position' => 57, 'supports' => array( 'title', 'editor', 'author', 'excerpt', 'custom-fields', ), 'taxonomies' => array( 'category', 'post_tag', ), 'rewrite' => array( 'slug' => 'dashboards', ), ); register_post_type( 'dd_dashboard', $args ); } add_action( 'init', 'your_prefix_register_post_type' );
October 19, 2019 at 10:57 AM #16612Anh Tran
KeymasterPlease try setting
query_var
andpublicly_queryable
totrue
. -
AuthorPosts
- You must be logged in to reply to this topic.