WP Favorite Posts
Send an email to author when I add to favorites his post (5 posts)

  1. maske716
    Posted 3 years ago #

    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?


  2. Md. Ariful Islam
    Posted 3 years ago #

    I have faced same problem.

  3. Mustafa Uysal
    Posted 3 years ago #

    Yeah, It would be nice. Maybe next releases support this feature :)

  4. lildragn
    Posted 3 years ago #

    +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');
  5. lildragn
    Posted 3 years ago #

    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.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • WP Favorite Posts
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic