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?
- Category display using conditions
- Separate archive template to show posts and CPT by same category/taxonomy
- How to determ a custom post type url?
- Problem with custom post types, taxonomy and permalinks
- Fetch taxonomies by custom post type id array
- Plugin translation not working apart from name and description
- Get rewrite slug of custom post type in template
- How to check the terms in single custom post type template
- Weird problem happening with custom taxonmy when creating/updating posts
- get_terms showing all categories instead of the ones assigned to a specific post
- Create Custom Post Type Permalink Structure
- Add category in post type dynamically
- How can I move a custom taxonomy and its data from one post type to another?
- Conditional regex in add_rewrite_rule() for specific query filters & pagination
- Hierarchical Custom Post Types – Show only parent on tax archive?
- Filter categories of posts with checkboxes
- Custom Post Type rewrite
- Admin notice not displaying
- Custom page template for category taxonomy
- How can I display an archive of only one category of my custom post type?
- How to Get Current Custom Post Type Selected Taxonomy Term (Not All Terms)
- Custom Post Type: Upload Multiple Images
- Use post as category
- How to add custom post types to normal category pages
- Custom Post type is being ignored in query
- Pagination on category page with custom post types
- Insert HTML inside link in a walker
- Hide specific parent categories from post edit
- Custom Post Types and independent Categories – complex Taxonomy
- Call custom post type by category