if you want to get all selected tag in “publish_post” try below code. it will give you selected tag from post. remove wp_die("all Tags"); after verify that you can get proper tags on publish post.
add_action( 'publish_post', 'post_published_notification', 10, 2 );
function post_published_notification( $ID, $post )
{
$all_tags = $_POST['tax_input']['post_tag'];
if ( $all_tags )
{
echo "<pre>";
print_r($all_tags);
echo "</pre>";
wp_die("all Tags");
}
}
It will output all selected tags by comma separated like :
new10,new4,new5,new6,new7,new8,new9
Let me know if this works for you!
Related Posts:
- How to prevent posts from being published too close to each other?
- WordPress removing tags?
- Add tag to post api wordpress
- Set tags for a post – without tag creation
- Is it possible to Schedule Attachments in WordPress?
- Post publish only hook?
- Publish pending article from front end with a button?
- How to add a “publish” link to the quick actions
- Plain-text tag list?
- When a user creates a post (pending), send a confirmation link that allows them to publish
- Edit a post from frontend. post_tags get saved, but not separated
- Restrict the Number of Posts an Author can Publish (over time)?
- featuring old articles without messing up with the archive
- how to limit and display tag?
- Include related posts on a page
- How to add shortcode tags in single.php [closed]
- Remove post_tag from default post type, add custom taxonomy
- Does WordPress remove draft status automatically?
- What Can I Use To Add A Custom Button Between Publish button and Move To Trash?
- Limit number of posts a user can make per minute?
- WP Query related posts by current page Tag ID
- How can I create custom button in post.php
- How to display all posts assigned to some tag?
- How To Add One Tag to Multiple Posts?
- Add Post Tags to Body Class
- How to rename “Publish” metabox title in post screen
- WP Query – duplicated posts once including tags in search results
- wp_tag_cloud() and the_taxonomies() work but not the_tag()
- Tags to Post-ID mysql query. Tag Search
- Automatically Updating Publish Date Bug
- Display post from current category and same tag?
- How to give capability (publish contributors posts) to author role?
- Should I use posts or pages in this scenario?
- Display posts with tag that matches current post title
- Print a message if excerpt is empty after posts have been publish/update!
- “more” tag doesn’t appear when browsing category achives or search
- Display tag image in post using Taxonomy Images plugin index.php
- Help with Taxonomies
- Decide user that can publish a post
- How to switch wordpress post status between publish and schedule in MySQL?
- Calling Different Custom Post Timestamps in a table
- Copy post to separate database with “add_action(….)”
- How to get Tags with specific post id
- Do action on publish or update?
- How do I manage my users post before publish?
- WordPress query_posts by tag doesn’t work anymore(?)
- do more action after I publish a post
- Conditionals if tags exist?
- Assign published posts to another user automatically
- Display password protected posts to logged in users
- WordPress bulk category select when publishing post
- How to change the layout of posts when viewing all posts by tag [closed]
- Count several post tags
- Does WP automatically tag posts into the archive?
- Tags on products vs tags on blog posts. An easy way to duplicate them
- Post: how to set created date after post has been published [closed]
- Having pages after specifying post_type post
- Add delay to publish post
- How to check if there are posts with the same tag
- In what context should Categories and Tags be used
- Add post tags to previously created custom post type
- Publish a Silent Post without updating Feed
- Plotting posts on a graph
- How to add tag(s) to all posts from a specific category? [duplicate]
- Deleting post tags removes categories
- How to add first 3-4 post tags on WordPress Post Title
- What parameters do I need to pass to get_tags to get ALL tags for the site, when used in a post
- How to get tags when using publish_post
- Send email to user when I publish a new post
- Tag for custom post type
- Remove status ‘archived’ from the default post and page view
- How to count posts in tags within time limit
- Why do I have categories with duplicate slugs?
- Exclude posts in home slider from sections
- Display all tags even if they are not assigned to a post
- post is not showing more than 3949 words
- I really need help… I am looking for a solution about 28hours
- show only one category and filter by tag
- Create blog post from external source and set publication date
- Find post tags words in post content and link them to tag URLs
- Set multi posts random categories and tags
- Hide Certain Tags on Single Post Page
- Display only current page -> posts tags in page
- Posts tagged with a-new-tag does not appear
- How to Test a Blog Post for Update vs. Publish Status — Unique
- Query posts from a specific category and selected tag
- Back up post tags
- How to handle a post before publishing?
- Tags not appearing in “Add New Post” Page
- How can I count articles retrieved by tags
- Display the popular tags by default in the backend post edit page (without having to click on the link that displays them) [closed]
- Return All Post from publish to draft [duplicate]
- I am creating a front end dashboard where I need to show all the posts by the current user. So, I need to show posts in publish
- How to remove a specific script from bulk wordpress posts and images description?
- Tag page that displays specific posts
- Get related posts matching most of the provided tags using WP_Query
- How to remove category and other tags from posts page
- WordPress blog post tags in 2 rows
- WordPress converting ‘ to ’ and – to –?
- Display related posts randomly that match “any” existing tags?