Do you have has_archive
set to true
in you register_post_type
function? If so, you can use archive-shoes.php
as your archive template.
For more information about registering custom post types, please check https://developer.wordpress.org/reference/functions/register_post_type/
EDIT
To load a custom archive template (without having to use the default WP template naming conventions), you can use the archive_template
hook to set your own.
add_filter( 'archive_template', 'my_shoes_archive_template' );
function my_shoes_archive_template($archive_template) {
global $post;
if ( is_post_type_archive ('shoes') ) {
$archive_template = dirname(__FILE__) . '/my-file-name.php';
}
return $archive_template;
}
Check out https://developer.wordpress.org/reference/hooks/type_template/ for more information on this.
Related Posts:
- Get custom post_type’s archive URL
- Hook for post and page load
- wp_insert_post() or similar for custom post type
- How to create a custom template for a custom taxonomy?
- Custom post types filtered by taxonomy using REST API v2
- Changing the URL Structure of a Paginated Custom Post
- Retrieve single term slug
- How can I add programmatically custom taxonomy terms to a custom type post when saving posts?
- Understanding Permalinks on Custom Post Types
- Order custom posts by a date metabox
- Multiple parameters in a custom post type url rewrite
- Count all images of a certain post type
- Missing the first 6 Posts and displaying posts that are after the latest 6
- Custom Post Type/ Taxonomy URL rewrite
- Custom post type with tags
- Change order of an item under “New” on the admin bar
- Hide Meta Boxes for Non-Admins
- Permalinks for Taxonomy and Custom Post Type
- Hook to override title, image and content
- Why is conditionally loading a custom plugin’s code only on a specific custom post type causing the site content to disappear?
- Admin not showing all custom post type posts and views not working
- Populate dropdown from one custom post type inside another custom post type
- No posts found – Custom Post Type show_ui
- Customize my custom taxonomy table in Admin panel
- How do I do this with WordPress? Taxonomies?
- Custom-Posttype & Custom Taxonomy WP_Query
- Display Ad on Specific Categories
- Custom setting to show or hide field
- Redirect 404 page with ID in slug to associated page with same ID in slug
- Only keep the First and Last Revision of a post
- Action or Filter Hook for a Custom Importer
- Stuck in Order by more then one
- Show post in table front end
- Custom Post Type Permalink empty
- Set a CPT slug as a base name for all the taxonomies
- Admin Filter – Add Post Type Description on Post Type Page
- Custom taxonomy rewrite with query var returns %2F in URL
- Why is my category template ignoring post type?
- the_content filter on some post types only not working
- A form that can save/edit after first input
- Create 2 Post Types, one parent to another in Plugin
- Integrate Custom Post Type Events into Calendar
- BBPress Search results in WordPress search
- Form action doesn’t work if slug isn’t same as custom post title
- Displaying custom-taxonomy-terms sorted by parent/child-hierarchy?
- Pages Become “Archive” Instead of Using Page Template
- How do I add a Custom Post Type that looks and behaves exactly the same as Posts?
- Custom Post Type archive-{post-type}.php not working
- Custom post type single page (single-{CPT-name}) 404 when slug includes hyphens
- Tag page only display 10 posts
- Custom URL redirect in WP
- Custom Post type & Taxonomy 404
- How can I include active content in a custom post type?
- Dynamic CPT permalink structure based on ACF field value
- Run shortcode in custom script in wp_head if post type is CPT ‘Jobs’
- Custom permalink not working and showing 404 page not error
- Get post format
- get_delete_post_link() only works for administrator, even if other user has exactly the same permissions
- Custom Post Type (CustomPress) [closed]
- Custom post type and taxonomy cross registration [duplicate]
- Template code to split a post and print a custom field?
- Direct form to a custom page template
- Add Class according to the order of appearance
- How to know which archive page is active
- How do I add new post formats to twenty fourteen theme?
- If tag exists, then echo once
- Problem On Retrieving Post Meta Data on Custom Column [closed]
- Custom Post Type UI
- Need help with simple “if statement” checks to output particlular CPT data depending on what client uploads/fills out
- Custom Post Type page template doesn’t show up
- Is there a (preferable built-in) way to check what custom queries are used in a theme?
- Display All Courses in Course Archive Page
- Hide title field of selected post-types on edit pages
- Custom wp-query display post only today
- How to filter custom post type by multiple Taxonomies
- Order custom post type by taxonomy
- How to specify user ID for a CPT wp_insert_post when there’s no actual user (it’s programmatic)
- Display Custom Post Type Based on Taxonomy With WP_Query()
- Cannot display the_content() after removed WordPress 5’s auto embed feature (iframe & blockquote)
- Permalink for specific post type
- Allowing custom role user to edit post assigned to them but don’t let them create new custom type post
- Problem in moving cpt’s from local website to live website
- Permalink for custom post type pages not working
- Adding admin menu seperators around CPT’s
- How to add a new column in custom post type list?
- Update Cateogory Taxonomy Count for Attachment Post Type
- Child Theme problems
- Creating connections programmatically with common fields on CPT’s
- Calling specific page with wp query
- Trying to modify custom search function in plugin to search postmeta table for keyword as well as posts table
- Customising the admin columns for a custom post type, but now most of the built in categories don’t display?
- How to get Last post Id of custom post type in wordpress
- Connecting multiple post types? Or linking “News” posts with “Game” posts how?
- Querying multiple taxonomies in URL leads to wrong taxonomy archive
- WordPress Custom Permalink Structure with Custom Post Type and Taxonomies
- Make future posts visible to the public—not just within WP_Query
- Custom taxonomy archive page not routing?
- Unable to sort wp_query by date/time with multiple meta_key s
- Exposing custom fields to the user in custom type post
- Display tags & categories seperatly