have you tried building your tag array into a variable and passing that as a parameter to set_post_terms?
function add_author_taxonomy( $post_id ) {
global $wpdb;
if(!wp_is_post_revision($post_ID)) {
$my_tags = get_post_meta($post_id, 'user_submit_customauthor', true);
wp_set_post_terms( $post_id, $my_tags, 'author', true );
}
}
add_action('publish_page', 'add_author_taxonomy');
add_action('publish_post', 'add_author_taxonomy')
;
Related Posts:
- Show all terms of a custom taxonomy?
- Get used terms by an author as array of strings
- How to get the term before the last from a custom taxonomy?
- WP_Query use for a filter with multiple Taxonomies and Terms
- get_the_terms – only top level
- get_terms orderby numeric
- Query all posts of a custom taxonomy term
- get_term_link() returns incorrect url
- Can I prevent the user from adding more than two levels deep of terms inside of a taxonomy metabox?
- Why my filterable portfolio page work not perfectly between slug button and slug output WORDRPESS?
- How to get original custom taxonomy slug after the slug has been rewritten?
- How to get post’s current parent term ID?
- Copy taxonomy terms from one post to another programmatically
- How to filter custom taxonomy term name, slug, and description?
- Hierarchical taxonomy list with modificated term links
- Exclude product attributes from taxonomy terms loop
- Create a a form for custom taxonomy terms
- WordPress custom taxonomy
- How to break up php code to avoid echo
- PHP displaying wrong custom taxonomy images
- How to retrieve taxonomy Metabox fields in frontend
- how to display child terms with parent terms in custom taxonomy?
- WordPress different custom tag being displayed in on tag list
- Inserting terms in an Hierarchical Taxonomy
- How to paginate a list of custom taxonomy terms?
- How to find objects by terms
- WP_Query | Help me create a search term with an ‘OR’ relation?
- category not display in word press grammatically
- Get all taxonomies for all post types
- How do I get taxonomy terms by ID in a specific order
- Problems with function on function.php
- Display Post co-authored in Author Page
- Include a specific post to the query_posts and remove it if it is already in the returned list
- Add attribute / custom attribute to product in woocommerce
- How to change / delete product short description in Woocommerce
- Get direct children of custom taxonomy
- Show Custom Taxonomy Title
- How to output wordpress custom tags separated by comma?
- Get Custom URL For Custom Taxonomy
- Sum custom field values of particular taxonomy
- Create a hierarchical taxonomy list in WordPress
- Randomly Assign an Image’s Alt Text Based on Data From Post
- Grab posts by multiple categories
- Displaying custom taxonomy on WooCommerce product page
- Get term siblings of current child taxonomy
- Insert term and child term from frontend
- need help with existing code showing subpages
- Custom field values to taxonomy terms
- List taxonomy term slugs within shortcode (do_shortcode)
- Include Parent Term in wp_list_categories
- How can I access string value in an array?
- Getting taxonomy images to display on single-post with their terms
- Isotope Drop Down Categories Filter Function
- working with term_relationships table
- Use get() method to grab all categories and output inside another method
- Show the section only if custom taxonomy was chosen
- How to insert wp_users ->user login name to wp_terms when a new user registering?
- fetch woocommerce product with custom taxonomy
- Commas not displaying in implode
- Creating a Category Taxonomy
- Check in which custom taxonomy belongs and change the style
- Woocommerce getting top level category parent and make all sub categories have the same template and menu
- Trying to display terms from custom taxonomy within function
- Woocommerce Custom Meta Boxes- How to only display if they actually have content
- Hi need update in my terms for other taxonomy
- WordPress: Export/Import Yoast meta title & description to custom taxonomy
- Show related products by attribute based and certain conditions
- Display acf taxonomy attachment
- How to hide a child category and show his parent category
- Get taxonomy terms that share a common object property
- How to update posts’ custom taxonomy selection?
- How to add Text before my Custom Term and hide it when empty
- Create category after theme setup and modify the default one
- How to separate the taxonomies list from the form so that editing taxonmies is the same as pages and posts?
- wp_set_object_terms returns 500 error when called through AJAX function
- Editing the term_order field
- Using Sprit-sheet on WordPress categories
- How to insert text into post based on category – via single.php file
- Get Posts by Custom Taxonomy on Custom Post
- New term taxonomy and description in front page. Input’s
- Add active class to foundation 6 tabs while looping categories
- str_replace not preserving whitespace
- How to replace hard-coded list of custom taxonomy terms based on custom field query [closed]
- WordPress using get_term to retreive slug not working as expected
- How to display terms from two taxonomies in one php code?
- Custom Taxonomy as Link
- WordPress Rewrite Issue
- Get category id for a custom category and display it in a class
- Saving category as insert post
- Get all the contents of taxonomy and sort by term
- Query specific posts per user selections from dropdown menus
- Add Column to Term Database
- How do I change the Go To Categories link in the term_updated_messages
- Display terms on product page with shotrcode
- Query posts by custom taxonomy slug in WP REST API?
- get_the_term_list give me a whitespace
- Get category name of current post (CPT UI)
- Three different queries on same page
- I want to show image from custom field image on my custom page template
- How to make multiple custom taxonomies sit under custom post type slug?