How to Notify subscriber automatically about your New post

Automatic Post Notification
Automatic Post Notification
Automatic Post Service

You may wondering how people have such a large subscriber and a large feedreader base. How they find such a large group of people coming to their site and become their fan. how they find out their blog so easily and come again and again on the same blog.

The answer is simple ” They have Great content”. Now you can argue here, I also have great content, Most of them are my original research and most of them are trying to help users problem. Still , I have not have any subscriber or readership

You have a lots of  user subscriber/contributors and you have written a new post on your blog and now you want that all your old user and comment posters must know about this new post.

These are several reasons for notifying your user about your new post.

  • Your Domain Name is Little but tough to Remember.
  • You want to  Establish a healthy relationship with your subscriber.
  • You want to increase your traffic little bit.
  • You are writing something very special

reasons may differ from blogger to blogger. There are two solution for this simple problem. Yes, It’s Simple if you follow these two solution.

  • First install a newsletter or notify subscriber automatically using  newsletter plugin.
  • As a developer  You  always love to add such facilities in your theme, So You want to hard code such functionality.

So, here is my solution for the above said problem, Just copy and paste the following code in your function.php file

Step 1  : Email Notification code

[code lang=”php”]
function email_members($post_ID)  {
global $wpdb;
foreach( $wpdb->get_results(“SELECT user_email FROM $wpdb->users;”) as $key => $object)
$user_emails[] = $object->user_email;
$users = implode(‘,’, $user_emails);
mail($users, “New Post from rsatechnologies!”, ‘A new post has been published on <a>http://binaryNote.com.  Check</a> it out.’);
return $post_ID;
add_action(‘publish_post’, ’email_members’);

This is all, Now whenever you will publish a new post, this small function will send an email to each and every user of your website.

NOTE : Use this feature at your own risk  if you are posting two or three post daily on your blog. Your reader may find it a spam and you could loose your valuable readers too. Now a days the same is delivered using RSS subscribers, So You can encourage your readers for rss subscription also.

Related Posts

2 thoughts on “How to Notify subscriber automatically about your New post”

  1. Good article. But I think it is useful when you update your site or blog once in a while. For regular postings, RSS feeds or newsletter system is the best.
    Anyway, thanks Rakesh. Keep up

    1. You are right this feature is specially useful for the single blogger maintained blog. Thanks for your time to comment

Leave a Reply

Your email address will not be published.