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
- 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?
- How to add a “publish” link to the quick actions
- Plain-text tag list?
- Display posts by tag on page
- 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
- 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
- How can I display a specific user’s first published post?
- Remove post_tag from default post type, add custom taxonomy
- 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)
- Does an action fire when adding a tag via the “Tags” meta box?
- Every possible way to get data (posts) from WordPress
- how to programmatically change post tags
- WordPress post tag & custom field
- 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?
- How to rename “Publish” metabox title in post screen
- Tags to Post-ID mysql query. Tag Search
- count the total number of comments the user has received for his published posts
- How to add Tags Filter in wordpress admin dashboard
- Automatically Updating Publish Date Bug
- Display post from current category and same tag?
- How can I schedule a PAGE to go live at a future date/time?
- Should I use posts or pages in this scenario?
- How can I make a post that belongs to a category or have specific tags, display different from the other single posts?
- Using permalinks, category slugs, and tag slugs
- “more” tag doesn’t appear when browsing category achives or search
- Add multiple tags to multiple posts
- Decide user that can publish a post
- How to switch wordpress post status between publish and schedule in MySQL?
- How to add tags (custom taxonomy) to post class css?
- Copy post to separate database with “add_action(….)”
- How to get Tags with specific post id
- 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
- Displaying posts that belong to a specific author
- Assign published posts to another user automatically
- Display password protected posts to logged in users
- WordPress bulk category select when publishing post
- 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
- 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
- How can my plugin display a populated new post window
- How to add tag(s) to all posts from a specific category? [duplicate]
- Deleting post tags removes categories
- How do I keep raw HTML in my RSS feed and not lose my paragraph breaks?
- 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
- Hook when post is set from published to draft?
- Send email to user when I publish a new post
- Remove status ‘archived’ from the default post and page view
- 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
- 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
- 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
- Output posts with same name as tags?
- Display the popular tags by default in the backend post edit page (without having to click on the link that displays them) [closed]
- 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
- Get related posts matching most of the provided tags using WP_Query
- How to remove category and other tags from posts page