WordPress.org

Ready to get started?Download WordPress

Forums

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

  1. maske716
    Member
    Posted 1 year 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?

    http://wordpress.org/extend/plugins/wp-favorite-posts/

  2. Md. Ariful Islam
    Member
    Posted 1 year ago #

    I have faced same problem.

  3. Mustafa Uysal
    Member
    Posted 1 year ago #

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

  4. lildragn
    Member
    Posted 1 year 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
    Member
    Posted 1 year 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

About this Topic