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
- Advanced search form with filters for custom taxonomies and custom fields
- Show Custom Taxonomy Inside Custom Menu
- Why does a custom post type need the ”hierarchical’ args setting?
- Permalink rewrite with custom post type and custom taxonomy
- Include different loop templates in search query
- Custom post type taxonomy template
- Remove Taxonomy Slug when No Taxonomy is Assigned to Custom Post Type?
- Category page only displaying the posts from a custom type
- Custom post types, taxonomies, and permalinks
- Custom Post Type vs. User Page
- How to rewrite custom post type with custom taxonomy urls?
- need advice on how to do a lists using custom post types – taxonomy vs postmeta
- get the custom post type title/name
- Second Set of Eyes: One custom taxonomy shows in Appearance > Menus, one does not
- Several CPT’s with same Taxonomy name but with different Terms for each
- Best method to make posts searchable, sortable and filterable – custom field, tag or category?
- Custom post with more than one custom taxonomy
- Get the taxonomy of a post hierarchically
- Is there something like has_no_term
- List of Categories for Custom Post Type
- display posts of custom post type with custom taxonomy
- WP_Query order custom post type with certain meta key value by post modified date
- How to show custom posts
- Display Posts that fit a certain criteria on Category pages
- How do I find out which (page) template file my custom child post is looking for?
- How to search through all child taxonomies using WP_Query?
- Custom Post Taxonomy Template Not Loading Properly
- Show ajax form resuslts in page
- Exclude Posts in a Given Category
- Front page url permalink
- Custom Post Type Permalinks Problem
- Issue on Adding Taxonomy to Custom Post Type Using Function
- How is it possible to list custom post types by “category” like with simple posts?