I have this URL here https://www.gundogworld.co.uk/judge/
. I am wishing for this to be a simple archive page. On this page, it has the body class class="archive post-type-archive post-type-archive-tribe_ext_judge logged-in tribe-js
I cannot get the /judge
to display the archives no matter what I try. mod_rewrite
is active on the server, I turned all caching off, visited permalink and re-save after every attempt. in my child theme i have archive-judge.php
, single-judge.php
and taxonomy-judge.php
.
This is the code I have in the plugin where the post is registered, I have turned all plugins off (except the 2 required) and reverted to 2016 I have tried everything I can reading google for 3 weeks with no win!
/**
* Set the arguments for and register the post type.
*
* @link https://developer.wordpress.org/reference/functions/get_post_type_labels/
* @link https://developer.wordpress.org/reference/functions/register_post_type/
*
* @see Linked_Posts::register_linked_post_type()
*/
public function register_our_post_type() {
$post_type_key = self::POST_TYPE_KEY;
$labels = array(
'name' => esc_html_x( 'Judges', 'Post type general name', 'tribe-ext-judge-linked-post-type' ),
'singular_name' => esc_html_x( 'Judge', 'Post type singular name', 'tribe-ext-judge-linked-post-type' ),
'singular_name_lowercase' => esc_html_x( 'judge', 'Post type singular name', 'tribe-ext-judge-linked-post-type' ),
// not part of WP's labels but is required by Linked_Posts::register_linked_post_type()
'add_new' => esc_html_x( 'Add New', $post_type_key, 'tribe-ext-judge-linked-post-type' ),
'add_new_item' => esc_html__( 'Add New Judge', 'tribe-ext-judge-linked-post-type' ),
'edit_item' => esc_html__( 'Edit Judge', 'tribe-ext-judge-linked-post-type' ),
'new_item' => esc_html__( 'New Judge', 'tribe-ext-judge-linked-post-type' ),
'view_item' => esc_html__( 'View Judge', 'tribe-ext-judge-linked-post-type' ),
'view_items' => esc_html__( 'View Judges', 'tribe-ext-judge-linked-post-type' ),
'search_items' => esc_html__( 'Search Judges', 'tribe-ext-judge-linked-post-type' ),
'not_found' => esc_html__( 'No judges found', 'tribe-ext-judge-linked-post-type' ),
'not_found_in_trash' => esc_html__( 'No judges found in Trash', 'tribe-ext-judge-linked-post-type' ),
'all_items' => esc_html__( 'Judges', 'tribe-ext-judge-linked-post-type' ),
'archives' => esc_html__( 'Judge Archives', 'tribe-ext-judge-linked-post-type' ),
'insert_into_item' => esc_html__( 'Insert into judge', 'tribe-ext-judge-linked-post-type' ),
'uploaded_to_this_item' => esc_html__( 'Uploaded to this judge', 'tribe-ext-judge-linked-post-type' ),
'items_list' => esc_html__( 'Judges list', 'tribe-ext-judge-linked-post-type' ),
'items_list_navigation' => esc_html__( 'Judges list navigation', 'tribe-ext-judge-linked-post-type' ),
);
$args = array(
'labels' => $labels,
'description' => esc_html__( 'Judges linked to Events', 'tribe-ext-judge-linked-post-type' ),
'public' => true,
'exclude_from_search' => true,
'show_in_menu' => 'edit.php?post_type=' . Tribe__Events__Main::POSTTYPE,
'menu_icon' => 'dashicons-businessman',
'capability_type' => $post_type_key,
'map_meta_cap' => true, // must be true for $this->set_our_capabilities() to take effect
'supports' => array(
'author',
'editor',
'excerpt',
'revisions',
'thumbnail',
'title',
),
'has_archive' => true,
'rewrite' => array(
'slug' => 'judge',
'with_front' => false,
),
);
register_post_type( $post_type_key, $args );
}
the rewrite rules are as follows
judge/?$ index.php?post_type=tribe_ext_judge other
(.?.+?)(?:/([0-9]+))?/?$ index.php?pagename=$matches[1]&page=$matches[2] page
([^/]+)(?:/([0-9]+))?/?$ index.php?name=$matches[1]&page=$matches[2] post