Hi @mmczaplinski
Here’s a link to my repo. I have one pull request open but its just the server.js files changes when I served it to vercel: https://github.com/chaycesol/guestrealtyco
Here it is as is on Vercel so you can see what the endless loading looks like - as you can see it will endlessly reload until you refresh whenever you navigate to my custom post types on Property Owners and Renters: https://guestrealtyco-7vly1eidt.vercel.app/
Here is what my config looks like for my custom post type named “sub”:
indent preformatted text by 4 spaces
function cptui_register_my_cpts_sub() {
/**
* Post Type: subs.
*/
$labels = [
"name" => __( "subs", "twentytwenty" ),
"singular_name" => __( "sub", "twentytwenty" ),
"menu_name" => __( "Sub Content", "twentytwenty" ),
"all_items" => __( "All sub content", "twentytwenty" ),
"add_new" => __( "Add new", "twentytwenty" ),
"add_new_item" => __( "Add new sub", "twentytwenty" ),
"edit_item" => __( "Edit sub", "twentytwenty" ),
"new_item" => __( "New sub", "twentytwenty" ),
"view_item" => __( "View sub", "twentytwenty" ),
"view_items" => __( "View subs", "twentytwenty" ),
"search_items" => __( "Search subs", "twentytwenty" ),
"not_found" => __( "No subs found", "twentytwenty" ),
"not_found_in_trash" => __( "No subs found in trash", "twentytwenty" ),
"parent" => __( "Parent sub:", "twentytwenty" ),
"featured_image" => __( "Featured image for this sub", "twentytwenty" ),
"set_featured_image" => __( "Set featured image for this sub", "twentytwenty" ),
"remove_featured_image" => __( "Remove featured image for this sub", "twentytwenty" ),
"use_featured_image" => __( "Use as featured image for this sub", "twentytwenty" ),
"archives" => __( "sub archives", "twentytwenty" ),
"insert_into_item" => __( "Insert into sub", "twentytwenty" ),
"uploaded_to_this_item" => __( "Upload to this sub", "twentytwenty" ),
"filter_items_list" => __( "Filter subs list", "twentytwenty" ),
"items_list_navigation" => __( "subs list navigation", "twentytwenty" ),
"items_list" => __( "subs list", "twentytwenty" ),
"attributes" => __( "subs attributes", "twentytwenty" ),
"name_admin_bar" => __( "sub", "twentytwenty" ),
"item_published" => __( "sub published", "twentytwenty" ),
"item_published_privately" => __( "sub published privately.", "twentytwenty" ),
"item_reverted_to_draft" => __( "sub reverted to draft.", "twentytwenty" ),
"item_scheduled" => __( "sub scheduled", "twentytwenty" ),
"item_updated" => __( "sub updated.", "twentytwenty" ),
"parent_item_colon" => __( "Parent sub:", "twentytwenty" ),
];
$args = [
"label" => __( "subs", "twentytwenty" ),
"labels" => $labels,
"description" => "subcontent",
"public" => true,
"publicly_queryable" => true,
"show_ui" => true,
"show_in_rest" => true,
"rest_base" => "sub",
"rest_controller_class" => "WP_REST_Posts_Controller",
"has_archive" => false,
"show_in_menu" => true,
"show_in_nav_menus" => true,
"delete_with_user" => false,
"exclude_from_search" => false,
"capability_type" => "post",
"map_meta_cap" => true,
"hierarchical" => false,
"rewrite" => [ "slug" => "sub", "with_front" => true ],
"query_var" => true,
"supports" => [ "title", "editor", "thumbnail", "trackbacks", "custom-fields", "author", "page-attributes", "post-formats" ],
"taxonomies" => [ "category", "post_tag" ],
];
register_post_type( "sub", $args );
}
add_action( 'init', 'cptui_register_my_cpts_sub' );