Hi @James:
If you have the post ID of your newly created post (the $created
variable from your question) you use the wp_set_object_terms()
function, for example:
wp_add_post_tags($created,'My First Tag');
wp_add_post_tags($created,'My Second Tag');
wp_add_post_tags($created,'My Third Tag');
Related Posts:
- Fetch All Posts (Including Those Using a Custom Post Type) With WordPress API
- How can I include custom post types on a tag page?
- Taxonomy count per Post type
- post_tag taxonomy with custom post type
- Adding post tags to custom post types
- REST API: How can I restrict a custom post type to only be accessible by authenticated users?
- show tags of custom post type ONLY
- Tag list & tag index for custom post type
- Undefined property: stdClass::$labels in general-template.php post_type_archive_title()
- Search Custom Post Type with all meta attached?
- Custom post type tag archives don’t work for basic loop?
- How to create download links based on Custom Fields with Rewrite API
- Exclude Custom Post Type & Pages From Auto-Tag Function
- How to search from specific post type with tags?
- Custom post metadata not appearing in public API
- Custom post type with tags
- Registering tags taxonomy for a custom post type
- Categories and Tags not working!
- Is it possible to make tag archive page specific to Custom Post Type?
- Search doesn’t find tags or categories in custom post types
- Navigation menus not showing because of custom post type filter
- Where to store custom tagging data associated with a custom post type
- Can custom taxonomies items have attached properties?
- Change Permalink Structure for Tag.php template
- Does anyone have a plugin that could automatically tag custom post types in wordpress?
- How to display Custom Post Type Post based on Tag with Shortcode Parameter?
- How do I get the intended post type of a revision post?
- Can’t query tag and post_type at the same time
- Custom post types and tag archive pages/permalink structure issue
- Tag Archive for Custom-Post-Type Posts yielding 404 when permalinks set to postname
- search also in taxonomy, tags and custom fields
- Listing tags from a custom post type
- wp_update_term_count_now doesn’t work with a custom post type?
- Add tag to a custom post type doesn’t change the total of custom post type in backend
- Make parts of your wordpress website completely built with data from external APIs?
- Exclude objects from WordPress API based from ACF field using rest_prepare_{$post_type}
- Cross reference custom post types
- How can I show 1 featured post in a styled element, and the next few below differently styled
- Pros and cons of a custom page vs custom post type template file
- Show all tags on custom post type
- Best way to specify “article type” in URL
- Tag page only display 10 posts
- CRUD operations in wordpress
- How to display custom post type tags?
- Display posts with tag for custom post type only
- Meta data (Tags and Categories) for Custom Posts not showing.
- Tags not working in my custom post type
- portfolio custom type tags support
- Need help deciding on a taxonomy
- display custom taxonomies limited to custom post type?
- Get Posts by Category, Tag , and CPT Taxonomy
- Is it possible to have “two” sets of tags?
- WordPress admin display post type tags as checkbox
- WordPress custom API endpoint – how to make the request more flexible
- The Difference Between Categories and Tags and Taxonomies and Terms
- Show all Tags in each post
- wp_get_canonical_url showing first url of the post for custom page
- WordPress as a backend for external service? [closed]
- add custom tags for custom post type in wordpress
- Custom permalink structure for remote content pages
- If tag exists, then echo once
- Custom post type, taxonomy and admin bar
- display custom portfolio tags
- Advanced archive url structure (category, tag and date)
- Tag template not returning posts [closed]
- Use Gravity Forms and a Shopping Cart for output to Freshbooks for an Estimate [closed]
- Why doesnt my tag page populate with this custom post type?
- Sync posts via JSON API
- Use a template for a specific url slug without creating a page
- How to Grab Anime info using Jikan API and fill the value in Metabox
- get taxonomies from terms
- how to display posts content on the custom css popup by clicking on each title on the sidebar?
- Tags being removed upon updates to related posts: ACF/Genesis/WP5.4.1
- CPT tags not showing when editing post
- How to display “META” array in register_taxonomy
- How to convert Post Object Custom Field into Tags
- Populating Custom Fields from live JSON
- How to add independent “Tags” to Custom Post Type?
- Automatically / dynamically populating tags in custom post type
- Add tags to a “pending” post before publishing
- Custom post tag images not displaying with ACF
- Use Tags to Query Associated Multiple Posts and Get The Average Of Custom Field Values
- Organizing The Custom Post Type with Taxonomies / Parent Posts
- Insert custom post data in to MailChimp campaign email
- Loop multiple taxonomy in custom post
- Default taxonomy ‘post_tag’ added to CPT managing by custom role : nothing in the metabox
- Taxonomy count per Post type
- WordPress Custom Post Type and sort by Tags
- Custom Post Type Tags Showing Under Regular Post Tags
- get tags from custom post type
- Query Custom Post Type by Tag
- Display by tag from different post types
- Tag-post relationship problem
- WordPress 3.1 – Tag page not showing posts from custom post type
- wp_insert_post not working for custom post type?
- Attaching multiple custom taxonomies to one CPT?
- Can WordPress show posts based on a button that the user clicked 2 pages back?
- Custom plugin contact form connecting to mailchimp API
- display posts, pages and custom post types from another wordpress site
- How to consume external API from WordPress post editor and display the response data in the custom field?