admin管理员组文章数量:1296307
I am using WordPress directory theme. I want to send an email to the author of the post whenever he publishes a new post. Currently, email is just sent to the administrator only. I didn't find any code utilizing wp_admin
function.
I am using WordPress directory theme. I want to send an email to the author of the post whenever he publishes a new post. Currently, email is just sent to the administrator only. I didn't find any code utilizing wp_admin
function.
- you need to create a plugin to do this. have you ever made a plugin ? read this : developer.wordpress/plugins/the-basics – mmm Commented Aug 28, 2015 at 20:42
2 Answers
Reset to default 1The easiest way is to tie into the WordPress action publish_post
. Here is a link to the codex with a basic example:
https://codex.wordpress/Plugin_API/Action_Reference/publish_post
Note: If you are looking to do this for a Custom Post Type, you'll need to add an action for publish_custom_post_type
.
Although I haven't tested it, a quick search revealed this (new) plugin which claims to do what you want:
https://wordpress/plugins/publish-post-email-notification/
Publish post notification is plugin which will send automatic email when the post is published and approved by WordPress blog. admin have to go to setting and set email template thats it all other things are managed by this plugin.
本文标签: Send email to author of post on post submission
版权声明:本文标题:Send email to author of post on post submission 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741630749a2389351.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论