A category is just a taxonomy. And taxonomies are made up of terms. You’ll need to set the post’s terms via wp_set_post_terms.
This should be fairly simple:
wp_set_post_terms( '42', array( 'term', 'terms', 'terms' ), 'q-categories' );
Related Posts:
- Custom Taxonomy as checkbox or dropdown
- Taxonomy: Why ‘with_front’ => false DOES NOT WORK?
- Custom Taxonomy as Dropdown in admin
- Custom Taxonomy’s Label to change the text appearing in Appearance > Menu
- How to completely disable a taxonomy archive on the frontend?
- How to limit the number of terms (terms acts like categories)
- How can I list all the categories under a Custom Post Type (taxonomy)?
- Retrieve single term slug
- How to show term-specific post list, without posts associated with child terms?
- Query multiple taxonomy in Custom Post Type
- Custom Post Type: How to display all of same taxonomy?
- Remove “-2” from a Toolset Types URL with the same post name
- Custom post type taxonomy template
- Is slug “type” reserved and can’t be used in taxonomy rewrite?
- Listing taxonomies from custom post type
- Remove Taxonomy Slug when No Taxonomy is Assigned to Custom Post Type?
- Taxonomy Templates
- Custom Post Type and Taxonomy combination
- Custom Taxonomy Creates Unwanted Integer Terms on Post Save
- How to check the terms in single custom post type template
- How can I move a custom taxonomy and its data from one post type to another?
- Query Multiple Taxominies Across Multiple Post type’s
- Custom Taxonomies not appearing in Admin
- Custom Post Type Taxonomy Filters
- Taxonomy custom post type URL
- Get related posts of child term of custom post type
- Limit amount of posts made within a custom taxonomy
- Issue on Creating Custom Tax Term Dynamically From Another CPT Meta-box On Publish
- list taxonomies from a custom post type
- How do I display the taxonomy for a custom post type in an array
- How do I check if the user is on a taxonomy term parent, child or grandchild page?
- Taxonomies relations
- Full Custom Post Type List Organised by two Taxonomies
- WordPress Doesn’t Generate Taxonomy Archive
- Suggested Post and Taxonomy structure
- Custom post with more than one custom taxonomy
- Get the taxonomy of a post hierarchically
- Adding custom taxonomy in same menu place with two custom post types
- How to get list of taxonomy slugs ordered parents>childs?
- Multiple tag cloud filtering
- Get url.com/post_type/taxonomy/term work!
- Different Category system needed for the Custom Post Type
- Custom Post Type Category Link
- Custom Post type category pages template and loop
- Rename a slug label
- Custom taxonomy (categories) on custom post type return no results
- How can I create an automatic drop down menu with my tags?
- List custom taxonomy as navigation – taxonomy pages with all it’s posts?
- Rewrite custom post type with taxonomy
- WordPress multisite – is it possible to have different taxonomies for each site?
- My custom taxonomy is only displaying 1 of 3 terms
- Query custom post types & Taxonomies and list them in a table on a page
- How to show list of taxonomy terms associated with specific post?
- Creating custom post type posts and associating them with a post from another custom post type
- I have custom post type with custom taxonomy. But not found the taxonomy page..
- Group Custom post type in a taxonomy page by its child taxomony
- Custom Taxonomy Terms in Menu lead to which page?
- Getting List of child terms from custom taxonomy parent
- Custom taxonomy query showing more than 4 posts
- Using page title as a link to term archive
- How to display posttypes and taxonomy in standard posts, not in a separate label?
- “Menu order” being ignored when querying posts from a parent taxonomy with “include_children” set to true
- How to get post count of specific taxonomy that have store name & category
- Duplicate slug/permalink issue while adding same post name
- Get the taxonomy value in the post loop inside the archive page
- Filter taxonomy by CPT
- How to show related posts of category on post within custom posttype
- How to add CSS class field in Custom Taxonomy?
- WP_Query for custom taxonomies showing posts from non-specified terms?
- Get all posts for custom taxonomy term
- Listing all custom posts having a specific taxonomy whatever the terms
- How to manage a dynamic multi-level page hierearchy system?
- Display custom tax in “while” loop
- Categories manage
- tax_query not working?
- Showing taxonomies with terms that are attached to custom post
- Custom Taxonomy page redirecting to 404 page
- Changing an item in drop down after 5 latest posts per taxonomy
- I want to create an archive and single page for a custom taxonomy for a custom post type
- Taxonomy’s title
- Display all posts from single taxonomy term
- Connect 8 Taxonomies to One (Main) taxonomy. How to?
- Filter By Term Not Working – Custom Post Type
- Displaying WordPress posts from post and custom post type in custom taxonomy
- Custom post type taxonomy template and URL confusion
- Custom Taxonomy is disabled on Edit page
- Override “Parent” input for custom taxonomy
- Custom post type post taxonomies
- Connecting multiple post types? Or linking “News” posts with “Game” posts how?
- Sort by Custom Post Type (Multiple Loop)
- How to display elements of different post types?
- How to display only taxonomies of custom post type in a page?
- Check if taxonomy is attached to at least one post in a post-type
- Looping taxonomy in taxonomy?
- Custom posts and custom taxonomies for many products and categories?
- List custom taxonomy terms
- How do i get the taxonomy term name on the CPT archive page?
- Display associated taxonomy child name on single CPT page
- Issue On Listing Woocommerce Parent Tag List
- Show custom category archive as front page and remove taxonomy slug from urls