Multiple Permalinks for custom post type post

Yes this is possible using add_rewrite_rule(), something along the lines of add_rewrite_rule( ‘test-subject/(\d+)/?’, ‘index.php?post_type=CPT_slug&post_id=$matches[1]’ ); add_rewrite_rule( ‘ts/(\d+)/?’, ‘index.php?post_type=CPT_slug&post_id=$matches[1]’ ); It might be a bit trickier though, since test-subject/test-title and test-subject/post_id are quite similar. Adding the post_id-rule with the 3rd argument as ‘top’ might help.

Display Custom Post Type in divs just thumb and title

erase all the code above from your functions.php and use this: function cw_post_type_portfolio() { $supports = array( ‘title’, // post title ‘editor’, // post content ‘author’, // post author ‘thumbnail’, // featured images ‘excerpt’, // post excerpt ‘custom-fields’, // custom fields ‘comments’, // post comments ‘revisions’, // post revisions ‘post-formats’, // post formats ); $labels … Read more

Custom post type not saving

try this: // CUSTOM POST TYPE 1 add_action(‘init’, ‘ootb_tenant_register’); function ootb_tenant_register() { $labels = array( ‘name’ => _x(‘Tenants’, ‘post type general name’), ‘singular_name’ => _x(‘Tenant’, ‘post type singular name’), ‘add_new’ => _x(‘Add Tenant’, ‘tenant’), ‘add_new_item’ => __(‘Add New Tenant’), ‘edit_item’ => __(‘Edit Tenant’), ‘new_item’ => __(‘New Tenant’), ‘view_item’ => __(‘View Tenant’), ‘search_items’ => __(‘Search Tenants’), … Read more