01-13-2014, 01:49 PM
This snippet will publish your article to unlimited number of other blogs as soon as you hit that "Publish" button.
Copy and paste the snippet into file FUNCTIONS.PHP in your wordpress current theme's folder
Stumbled upon it here http://armantogoblog.tk/2014/wordpress-s...tis.goblog <== he has an english version of the the post too
Copy and paste the snippet into file FUNCTIONS.PHP in your wordpress current theme's folder
Magic Button :
PHP Code:
// SEND BLOG POST TO BLOGS-NETWORK VIA EMAIL ONCE POST IS PUBLISHED
function post_to_blogs($post_id) {
if( ( $_POST['post_status'] == 'publish' ) and& ( $_POST['original_post_status'] != 'publish' ) ) {
$post = get_post($post_id);
$postpermalink = get_permalink($post_id);
$author = get_userdata($post->post_author);
$email_subject = $post->post_title;
$message = $post->post_content;
// This will add a link back to your site
$message .= "<p>Source: <a href='" . $postpermalink . "' target='_blank'>" . $email_subject . "</a></p>";
// Add emails of blogs below. Example: $blogs_email = array("armanto.bejo.senselessness@blogger.com", "anotheremail@tumblr.com", "another.one@blogger.com", "moremail@blog.com" .. and so on ..);
// I've added armanto.bejo.senselessness@blogger.com so you can plant backlinks there and test this snippet, the blog url is senselessweb.blogspot.com
$blogs_email = array("armanto.bejo.senselessness@blogger.com", "armanto.bejo.senselessblurp@blogger.com");
$nomor = 0;
foreach ( $blogs_email as $blog_email ) {
$blog_email = $blogs_email[$nomor];
wp_mail( $blog_email, $email_subject, $message );
$nomor++;
}
}
}
add_action( 'publish_post', 'post_to_blogs' );
Stumbled upon it here http://armantogoblog.tk/2014/wordpress-s...tis.goblog <== he has an english version of the the post too