Can’t give you fish, but I can try you to teach how to fish with a couple of pointers;
- hook into publish_post (good example code there) and / or post_updated
- in the function that is called that way, use wp_create_category (which will only create if the cat. name doesn’t exist yet)
- and with the cat ID you get that you then call wp_set_post_categories (make sure to set the 3rd param to true)
happy coding! 🙂
frank
Related Posts:
- Get Posts Under Custom Taxonomy
- Different post sort order within different categories
- Exclude posts that only have the ‘Uncategorized’ category [duplicate]
- Show Custom Taxonomy Categories, Listing of Posts, and Single Post via AJAX
- How do I get the slug of a custom taxonomy category of a post?
- Add Category name to Post Title (h1)
- I want to show category in the post title , how can I do
- How to Restrict Previous & Next Post Link to Posts of Same Category?
- Get Posts Under Custom Taxonomy
- Prepending %category% onto default posts fails
- How can I setup a relationship using categories in WordPress?
- How can I hide tags on a child-category page, if that tag has not been used?
- How do I include the category next to the title of a post?
- WordPress bulk category select when publishing post
- Change Post Title For Specific Category
- Unable to differentiate between two categories under custom post type on single.php
- Geting error in post and category [closed]
- How to select a category automatically based on a word in WordPress post title?
- Page with Category Returning 1
- Post Category link is same with Page link
- How to get post count including nested categories
- Is it possible to have different header style blog titles in different categories?
- Taxonomy Category category.php not working
- How to get the number of posts in a selected category?
- Show related posts by category but ignore one category
- Add custom field to category of custom post type
- Can I hide a specific post from latest posts page?
- How to intercept Post Title on Post-Save
- How to show post(excerpt) from specific category on wp page?
- Redirection to taxonomy posts list after post submit.
- Remove custom posts that match taxonomy value
- WordPress – Admin Manage Posts – Multiple Filters by Parent Category
- Custom Theme Want To Remove One Category From All Displays
- Divide Loop Into Days & Categories
- How Can i Get 5 Recent Post Title With Corresponding Link?
- Different template for posts of all subcategories of category
- Mark menu item as current-menu-item for category
- How to set up multiple taxonomies for groups of posts
- Avoid duplicate post from same Taxonomy
- How to display category from recent posts?
- How to display data in archive page?
- Can I divide the pages into categories?
- Duplicate posts and change category
- Category Foreach keeps looping?
- Setting posts_per_page for taxonomy term template
- display a random post thumbnail from a random category
- Post page to display specific category
- Duplicate Custom Post Type and Taxonomy Slug
- how to show single post in a custom template
- Related posts by category not working right
- Listing Specific Categories from Current Post with Depth
- 404 error on default post type and default taxonomy fronted page
- How to Mysql select a list of posts with meta_values AND all relevant categories?
- Redirect to another page using contact form 7? [closed]
- get_the_category listing in hierarchial order
- outputting posts’ taxonomies: cant get ‘get_the_taxonomies’ working
- Show posts on front page only
- Get featured image on hover of post title [closed]
- Post is in descendant category not working in home.php
- How to get posts ordered by using their categories?
- Hide parts of the post content after typing it’s name or searching it by category
- SQL Bulk Move old posts by one author to another category
- load more posts by category
- Display Related Posts by Category in Random
- How to show beneath posts the full category path?
- Display Current Posts Category (with the most posts)?
- Only the most recent post is showing on my category page (working on localhost, not live site)
- ACF date picker to trigger category change
- Get category slug of the Parent category of a Product
- exclude particular category in api
- Make categories appear random
- Exclude posts in a category on one page but show those posts on a different page
- How to add a block to a category page?
- Add id attribute to h1 element of wordpress post
- How to manage a dynamic multi-level page hierearchy system?
- Excluding category from post navigation in WordPress?
- Odd hyphen added at end of blog post
- Show custom post category for single post
- Get a list of categories that are related to posts
- Querying posts from current category, using a variable as array argument
- wordpress display posts by terms id or name
- Precedence of page permalinks over woocommerce product category links?
- Custom Taxonomy From Database
- Need help writing loop to display posts by categories in separate divs
- Add category selection to function request
- Query post category & remove any post id
- Multiple Post Repeat for Related Post Loop by Category
- Show Post number of specific Category
- how to show posts on different pages if number of post per page is one
- Get post title of faulty link on 404 error page
- Is possible to create a custom link that creates a post that’s already categorized?
- Category pages vs single post pages
- How to display subcategory articles in the category view?
- How do we display a certain category type on a page while hiding all others?
- wordpress category Description not allowed tag
- How to get a list of all posts and their categories?
- Show posts assigned to multiple categories in current category page
- How to display related posts from the same category?
- Mismatch between posts count and actual list in admin posts page
- How to keep prev/next nav on posts in same taxonomy