You would do it by assigning the taxonomies when registering the post type:
'taxonomies' => [ 'taxonomy1', 'taxonomy2', ..etc ],
- https://developer.wordpress.org/reference/functions/register_post_type/#taxonomies
- https://developer.wordpress.org/reference/functions/register_post_type/#taxonomies-2
You can also use register_taxonomy_for_object_type to do this if you want a function call. You still need to register the taxonomies though or this won’t work.
Note that this won’t change your CPT’s permalinks, but that’s a separate question that has been asked many times on the site already.
Related Posts:
- How to change permalink structure for custom post type and it’s taxonomies?
- Get the first post term
- Creating “static” taxonomies to choose from, inside custom post type?
- How to completely disable a taxonomy archive on the frontend?
- How can I list all the categories under a Custom Post Type (taxonomy)?
- How to list all categories and tags in a page?
- How to sort list of custom posts to get view like a tree of posts under categories and their children’s categories?
- How can you make permalink work for custom post type and taxonomy?
- How to get a list of term names of the custom post type im currently on in single.php
- On clicking on the category name the page is redirecting on 404 pge
- WP Query group/order by category name
- List all custom post type posts from a given category?
- Custom post type taxonomy template
- get_categories for custom post type and filter by custom taxonomy (brand) and list child categories of a defined category
- Category page only displaying the posts from a custom type
- Show Post Count of a Category
- Custom Post Types and Categories?
- How to create new category for custom post type?
- Get Post Primary Category
- Pagination is not working on single-{slug}.php but works fine on page-{slug}.php
- How to get the post type from a category id?
- Metadata for a taxonomy – is there any WordPress way of doing this?
- How to show CPTs in term archive
- Display all posts in main category and 1 subcategory
- Show category ID on custom post type
- Categories of custom taxonomy don’t show any posts
- How to display custom taxonomies with links in filter menu?
- Limit amount of posts made within a custom taxonomy
- Set a CPT slug as a base name for all the taxonomies
- Conditional statement for if archive page has posts which contain certain taxonomies/categories/tags, show those terms
- Custom Post Type Category Link
- Custom Post type category pages template and loop
- Redirect to another page using contact form 7? [closed]
- Categories and tags for custom post types
- get_category_link() for custom post type does not include custom slug rewrite?
- Targeting categories in custom fields
- Invalid Taxonomy
- Need help deciding on a taxonomy
- Get Posts by Category, Tag , and CPT Taxonomy
- Get assigned post categories
- Default Category Page not showing custom post type which has taxonomy category
- Categories won’t appear on custom post type
- Custom Post Type with modified permalink structure results in 404
- Custom post type, taxonomy and admin bar
- Displaying taxonomies as category links within sidebar and creating pages for these
- Custom post category name showing empty
- Custom post type archive page filters
- How to show related posts of category on post within custom posttype
- How can i display a taxonomy? i have created a plugin and then a custom type. and a taxonomy , also i have register it
- get taxonomies from terms
- Create custom post type categories
- Set a Default CPT taxonomy by taxonomy id
- how to create custom taxonomy drop downs for parents and child
- How to seperate posts by categories?
- How to Use A Custom Post Type as Taxonomy for Another Custom Post Type
- How to manage a dynamic multi-level page hierearchy system?
- Categories manage
- I can not call the categories of custom post type
- Reuse the “category” slug for a custom post type
- How to create groups like that in buddypress?
- Update Cateogory Taxonomy Count for Attachment Post Type
- Organizing The Custom Post Type with Taxonomies / Parent Posts
- Best way to structure article and issue relationship for CPT
- Custom Post Type used for FAQs Accordion
- category_name not working in WP_Query
- How can I set up the URL for a category archive for a custom post type?
- Custom Post Type order Title ASC
- show only one category posts in admin
- How to separate posts by categories?
- Is it possible for post and custom post type to share a category base slug?
- How to determ a custom post type url?
- How do I append multiple taxonomies to the URL?
- Only list categories that contain posts of a specific custom post type
- Remove quick edit for custom post type
- Count posts that have specific taxonomy term attached
- Get the ‘slug’ of a custom taxonomy
- Include custom post type in “all posts”
- Custom Taxonomy – Tags Metabox is showing instead of Categories
- Using custom page templates with plugin [duplicate]
- Custom Post Type Archive Page Filtering
- Form action/link to render a plugin in WordPress front-end
- How do I share categories across multiple post types?
- How to assign tag to custom post type in wordpress?
- post_parent in custom post type
- Problem with adding custom post type meta to header by plugin
- Creating alternate meta box context locations
- Get posts by category name
- List child categories from parent category on custom taxonomy page
- CPT archive with WP native/core tax/categories
- Category permalinks don’t work even after flushing
- delete category on plugin deactivation wordpress
- Change custom post taxonomy values from front-end
- Pages of my taxonomy terms are showing all posts
- Custom post types not displaying per category
- Displaying taxonomy icon outside archive page
- Synch Custom Post Types (and Custom Fields, Cats, etc.) Between WordPress Sites
- Get all custom_post_type posts + blog posts from one category in a single query
- Select Category as Page Parent
- How do I get parameters from the URL?
- Query custom fields with three dates – start and end does not work