[sage8 question]
I’ve been using Sage for ages, and am officially stumped on this scenario…
I always use CTPs, but for some reason, this site is giving me issues.
There’s a CTP set up, and I’m attempting to display the archive page (sitename.com/custom-post-type). It seems to skip the base.php and render the index.php directly - so I have a page that is showing the correct content, but isn’t using the wrapper that every one page uses. I have no idea why.
There was pages with the same name as the custom post type, so I’m wondering if there’s some sort of weird conflict going on… I have deleted those pages (including from the trash) and flushed the permalinks…
Here’s the code for the CPT - (this was created using CPT UI previously, before my involvement).
$args = array(
"label" => __( 'My CPT', 'sage' ),
"labels" => $labels,
"description" => "",
"public" => true,
"publicly_queryable" => true,
"show_ui" => true,
"show_in_rest" => false,
"rest_base" => "",
"has_archive" => true,
"show_in_menu" => true,
"exclude_from_search" => false,
"capability_type" => "post",
"map_meta_cap" => true,
"hierarchical" => false,
"rewrite" => array( "slug" => "my-cpt", "with_front" => true ),
"query_var" => true,
"supports" => array( "title", "editor", "excerpt", "revisions", "author", "page-attributes" ));
register_post_type( "my-cpt", $args );
Any advice?