You can redirect, when someone tries to see the archive
or the single
of your custom post type, just redirect them to another page, just put this in your functions.php
add_action( 'template_redirect', 'theme_redirects', 99 );
function theme_redirects() {
if ( is_post_type_archive( 'post_type_slug' ) || is_singular( 'post_type_slug' ) ) {
wp_redirect( 'my_url' );
die();
}
}
See references:
Related Posts:
- Custom post type single-{custom}.php not working
- Filtering a custom post type by custom taxonomy in archive template
- Permalink Structure for Multiple Post Type Archives by Taxonomy
- get term archive url / link
- Pagination throws 404 error on custom taxonomy archive pages
- Archive page with multiple taxonomies rewrite
- Create permalink structure for one taxonomy archive per custom post type
- is_singular won’t call my functions?
- Pages, Custom Posts & Custom Taxonomy defining slug structure
- How to show a tag archive of one post type only
- Custom taxonomy archive page not working
- How to show multiple post types on taxonomy archive?
- How to create archive page for taxonomy terms within custom post type
- Category and post tag archives do not include posts from custom post type
- Get post type from taxonomy or category page
- custom taxonomy archive by year
- Need post_type_archive_title function but in ‘single’
- Display custom post type taxonomies as an archive page
- How to check the terms in single custom post type template
- How to show the archive / post type description on Single templates
- Archive page for taxonomy terms
- Single Template that can be applied only via URL
- How do I display tags for a custom post type single page?
- Custom Post Type Archive Page Filtering
- Root slug of taxonomy returning 404
- Create template for taxonomy results limited by Custom Post Type
- How do I check if the user is on a taxonomy term parent, child or grandchild page?
- Custom post type / taxonomy rewrite archive page 2 gives 404
- How can I get this request to use the Custom Post Type page template instead?
- Not Able To Render Single-CustomPostType.php File
- Archive for a Taxonomy of a Custom Post type
- single-{post_type}.php not working
- Get term name without a foreach loop
- What’s the name of the custom post type yearly archive template?
- Custom Post type & Taxonomy 404
- Taxonomy archive 404ing (not term archive)
- Custom taxonomy or custom page templates?
- Dynamically insert an article at the top of a taxonomy archive – or?
- Only show posts with a specific term of an associated taxonomy in a custom post type archive
- Use the custom post type archive for taxonomies?
- How to rewrite custom taxonomy term archive to use THE SAME SLUG/front as CPT
- Can’t access private custom posttype single- or archives-page
- Get the link of the first post of a custom taxonomy in a custom taxonomy list
- Archive page for custom post type and custom taxonomy
- Advanced archive url structure (category, tag and date)
- How can I tell if I’m on a custom post type archive page?
- Custom Post Type Archive Page showing as 404
- How can I write slugs / permalinks as: custom post type -> custom taxonomy and custom post type -> custom taxonomy (one CPT and many taxo)?
- Set up Custom Taxonomy Archive Template File To Cover 3 Categories
- get_the_terms child terms for current post/custom post only
- How to show custom post count in archive page
- Order archive custom posts by taxonomy term [duplicate]
- Custom category taxonomy – archive page not showing up
- Custom post type URL structure with site.com/custom_taxonomy_slug/post_name
- Making permalink for custom post type/custom taxonomy. Stuck with 404 in the single post
- Custom taxonomy archive slug overwrites static page
- Custom Post Type tag taxonomy “Page Not Found”
- Display Taxonomy Term for CPT on single-CPT.php
- How to display category wise posts on seprarate template
- archive-{custom_post_type}.php not getting recognized wordpress
- Archive.php is not displaying tags
- How to display custom post types AND regular posts separately on a shared taxonomy archive?
- Taxonomy Query of Custom Post Displays Archive Instead of Posts
- How to make a list of posts displaying them 5 by 5 with a “next posts” link?
- is_singular won’t call my functions?
- How to have a dynamic slug and rendering the archive-{post_type}.php?
- Show custom category archive as front page and remove taxonomy slug from urls
- Taxonomy term archive claims there are no posts, but there are. How to resolve?
- Custom Taxonomy archive with url parameters
- Auto Complete Search
- How to display custom post in archive section of the wordpress page?
- Custom Post Type Pagination Paginates Only in URL Structure
- How to display single post from custom post type loop?
- Set post terms for multiple posts
- Setup template_redirect using has_term when NO term assigned
- Load Custom_post_type categories post with ajax
- Custom Permalink Structure for Custom Post Type, Custom Taxonomy, Under a page
- Custom taxonomy returns 404
- Get terms that contain posts that in turn belong to other terms?
- WP-API select custom taxonomy when creating a post
- Best method to make posts searchable, sortable and filterable – custom field, tag or category?
- First custom field value (out of several) displayed twice after query
- Custom post with more than one custom taxonomy
- How to get custom posts sub category link
- Custom while loop for hierarchical display of a taxonomy
- The loop seems stuck to a single (now deleted) post
- Terms showing up in object cache on unrelated pages
- Lists custom taxonomy terms that has specific custom field value assigned to the term (not post)
- Get the taxonomy of a post hierarchically
- Adding custom taxonomy in same menu place with two custom post types
- How to make custom taxonomy into drop down select in a custom metabox
- Including taxonomy term before post type breaks top level pages
- Correct procedure for advanced permalinks
- Permalinks: custom post type -> custom taxonomy -> post
- List Taxonomy Terms based on another Taxonomy
- How to get the intersection of two terms both from different custom taxonomies
- Use “archive” as slug for custom post type
- CPT’s with landing page instead of archive – Url Rewrite?
- Template for all categories of a custom post type?
- How to change permalink to include custom post type