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:
- add action only on post publish – not update
- 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?
- Elegant way to include only published posts with get_objects_in_term()?
- How to remove Nextpage tag inside posts text depending of utm_campaign
- Verify if tag is used on posts
- WordPress plugin to publish to multiple remote WordPress blogs
- Post publish only hook?
- Publish pending article from front end with a button?
- How to add a “publish” link to the quick actions
- How to limit user to publish post per day and per role?
- Plain-text tag list?
- Display posts by tag on page
- 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
- In what sequence are the hooks fired when a post is “published”?
- Convert IPTC keywords to blog post tags
- Restrict the Number of Posts an Author can Publish (over time)?
- Add javascript when post is published
- featuring old articles without messing up with the archive
- how to limit and display tag?
- Publish posts only after the condition is met
- Hiding by default specific post status on backend list?
- Include related posts on a page
- Detect Post Type when publish_post is ran
- How to display post tags
- How to add shortcode tags in single.php [closed]
- How can I display a specific user’s first published post?
- 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?
- Prevent post from being published if no category selected
- Send email to user that his post has been rejected
- What Defines What Category A Post Picks (if in multiple)
- Limit number of posts a user can make per minute?
- Does an action fire when adding a tag via the “Tags” meta box?
- Every possible way to get data (posts) from WordPress
- publish_post conflicts with save_post
- how to programmatically change post tags
- Filter Posts By Tag
- Notification to Admin or Author upon new post [duplicate]
- WordPress post tag & custom field
- What differences are there between a Privately Published post and a Draft post?
- WP Query related posts by current page Tag ID
- How to run a function when post is edited or updated using publish post action?
- 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 prevent WordPress from updating the modified time?
- 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()
- Replace Tag Keyword With Link Within Post Content
- Excluding tag Link from html tags in Post content
- 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
- Bulk Post update_post_meta
- Can I Paginate Post after every 25 tag?
- Create blog post from external source and set publication date
- Show all posts from the tags without having to set all of them
- 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
- I want to send push notification just after publish a new post
- 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
- Add tags to post before it’s created
- How to handle a post before publishing?
- Tags not appearing in “Add New Post” Page
- Output posts with same name as tags?
- How can I count articles retrieved by tags
- Should new posts already have tags?
- Display the popular tags by default in the backend post edit page (without having to click on the link that displays them) [closed]
- retrieve post slug by post_tags taxonomy
- Related posts by searching post tags of single post as terms
- 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
- Action while post is being published
- How to remove a specific script from bulk wordpress posts and images description?
- Tag page that displays specific posts
- WordPress More tag doesn’t work on Single post
- How can add custom commands in post-new.php in wordpress
- Get related posts matching most of the provided tags using WP_Query
- How to remove category and other tags from posts page
- Insert Tag in WordPress Post
- Only an admin can add new tags
- WordPress blog post tags in 2 rows
- WordPress converting ‘ to ’ and – to –?
- It tells me that I exceeded the maximum number of executions when trying to publish content
- Display related posts randomly that match “any” existing tags?
- Unable to create categories and tags for posts in wordpress multisite
- How to add publish button in menu All Posts (Wp-Admin)