Hello guys, on my site, I need to be able to send an email to the authors of their post when I add a post to my favorites.
Is there anyone who can help me?
Hello guys, on my site, I need to be able to send an email to the authors of their post when I add a post to my favorites.
Is there anyone who can help me?
I have faced same problem.
Yeah, It would be nice. Maybe next releases support this feature :)
+1 This would be awesome to have. Maybe a hack could be fleshed out?
For example this is what I'm using to fire off an email to an author letting them know that their post was published.
//send email to author once entry is approved
function _notifyContributers($post_id) {
$post = get_post($post_id);
$author = get_userdata($post->post_author);
$message = "
Hi ".$author->display_name.",\n
Congratulations, your entry - ".$post->post_title." - has just been published.
";
wp_mail($author->user_email, "Your image is now live on Videogame-art.com", $message);
}
add_action('publish_portfolio', '_notifyContributers');Ok so I was thinking, is there a way to combine the function I posted with the one below?
function postfavorited(){
$postfavorited = get_post_meta(get_the_ID(), 'wpfp_favorites', true);
if($postfavorited != ''){
echo $postfavorited .' Favorited'; }
}
}
Maybe remove the "if" statement? Might try this out.
You must log in to post.