You can use publish_post
action hook for notifying post author.
function wpcs_author_notification( $post_id ) {
$post = get_post( $post_id );
$author = get_userdata( $post->post_author );
$message = "Hi " . $author->display_name . ", Your post, " . $post->post_title . " has just been published at " . get_permalink( $post_id );
wp_mail( $author->user_email, "Your article is published", $message );
}
add_action( 'publish_post', 'wpcs_author_notification' );
This function will notify author for published post. You can modify message in above code.
Related Posts:
- Different email notifications (about pending posts) to different users
- Notifications on WordPress Website [closed]
- Notifications Bar on home page only
- WordPress is redirecting me to homepage
- Is there a hook similar to “save_post” which only fires AFTER the post is completely published?
- Adding custom post category to categories widget
- How to display the custom post related blog by category?
- WP Forms not displaying,becomming an fatal error
- Randomize post (and page) IDs on generation
- Moving all wordpress posts from 50 websites to another website
- WordPress hide post from custom post-type on a single page
- How can I see $post object in frontend from functions.php?
- Show post object of any page in frontend
- .com creates automated link in post
- Allow members to create groups on my site
- Trying to add a new feature in my wordpress website
- Powerpress upload a podcast without creating a post for it
- automatically set random featured image by category in wordpress on post
- add tags to wordpress post using REST API
- Is it possible to customize a wordpress post from outside dashboard(Something like site.com/post-type/post/?e=post_id)?
- Prefix WordPress Taxonomy Tags With Hashtag Symbol Like Twitter
- Pagination (including title of each page) in a post for a long posts
- How to make a page both “private” and “password protected”
- Failed to load resource: the server responded with a status of 500 () post.php
- How to echo a PHP Code After the Content
- All Post WordPress Page Error
- WordPress Product Detail and catalog
- How to upload PDF from Front-End and post automatically?
- Is it possible to create duplicate post on other site (either push, on publish, or pull, periodically)?
- How to wrap image tag into div for post only?
- After form submission want to show success message in the form page
- How can I get the Post ID and Post Type within a Must Use Plugin?
- WordPress CPT Url metabox collection
- Get value from an input field and pass into update_meta_data as $meta_value
- Identify if the_post hook is being called from the admin post list
- Custom User Notice Upon Login
- How to show a message to a user?
- My own metabox checkbox plugin only saves the last value I’ve checked
- Get content and send to 3rd party
- How to prevent authors from editing their post count?
- Mobile Notification on a blog post
- Add dynamic color to each category item
- Include post_date in search
- Add Filter to get_next_posts_link
- Is there any hook to change media html in post? [duplicate]
- Is it possible to get a shortcode generated by a plugin, then, using a function, create a new post using that shortcode?
- How to Save settings of custom tab product page in admin side in a database?
- How to force regenerate thumbnails in WordPress posts?
- Displaying friend’s posts only
- WordPress Dashboard organize posts based on categories
- Add new post using a page inside the website
- Trending Tags based on post views
- Publish Post but don’t call publish hook in foreground post creation
- Hidden Some Setting on Post or Page [duplicate]
- How to display single arbitrary facebook post with a shortcode?
- Better code/text editing for posts and pages?
- Custom post type request switches to media request
- Serialize $_POST global in wordpress
- WordPress list child pages of custom post type
- Style WordPress Custom Post Type Single Page
- SWF in wordpress post
- How to use shortcode of any plugin to show it visually where i want?
- WordPress not updating post or disable plugin instead a white page appear
- get post excerpt by query
- Ger posts from similar tags and categories
- Related posts popup
- Posts are deleted everyday at night
- How to Batch Upload .docx Files as Posts
- Internationalization of Blog Posts
- Issues with Post 2 Post Plugin
- Find And Add Category to Posts
- Retrieve post thumbnails
- WordPress ultra slow if I click on posts?
- Enforce conditions only for draft posts using WyPiekacz, ignore pending and published posts
- How to add character to content of post?
- Get page type to display content
- Insert data in custom table during new post creation
- Capturing POST data
- single.php fires more than once after clicking on any post to view with different post id each time
- Twitter List Tweets and Delicious Links as Posts
- Most visited posts
- Get a submitted value from front end post form for single template
- Using Postmash plugin in WordPress 3.3.1
- What is the correct method for updating post content from a plugin?
- Custom feed parameters / Template overriding
- How to make only selected posts appear on a selected wordpress page
- Automatically set posts to NoIndex depending on category?
- Get post id in Post Page within Wp-admin
- wp_update_post does not change post status from draft to publish, returns 1
- PHP $_session is not work in wordpress
- Embedding BitBucket Code in Posting
- Static page with formatted post list
- Next and Previous Pagination button not displaying in WordPress
- How to block external download link access if visitor not referred from WP?
- Plugin to display text before a post
- Trying to disable all notifications except for one on woocommerce checkout page with css [closed]
- Automatically put a menu on every post
- Preset categories in wordpress by GET-paremters [duplicate]
- Distribute post content through several divs [closed]
- Does anyone have the Custom Post Permalinks plugin from John P. Bloch? [closed]