WP-Email - Best Wordpress Plugin For User To Recommend Your Article

You may notice that some popular websites add an “email this article to friend” link at the bottom of the article. This is to let people recommend the article to their friends. Adding such feature in other CMS are very easy, but how about add this features in a Wordpress blog?

There is a Wordpress plugin called WP-Email developed by Lester Chan, which add such feature to your Wordpress blog.

Before users can forward your article to their friends, they have to enter a verification code, which will greatly avoid spamming and will reduce your server usage also.

There are a lot of options which you can configure. For example, you can set your email template, SMTP options, and even a log file to keep track emails being sent by your users.

As a conclusion, this is a must have plugin if you seriously want to let your readers recommend your articles to their friends.

How To Delete Wordpress Post Revisions

Wordpress introduce post revision feature since version 2.6. It helps us to keep revisions of our posts and we can restore to previous revisions anytime.

Although this is a great feature, but what happen if you accumulate too many revisions? Probably your server will takes longer time to query and processes database requests. That means, your blog will load slower and your visitors may wait longer before the content comes out.

So, we may want to delete unwanted post revisions. This can be done by logging to phpMyAdmin and execute the SQL command, or use a plugin.

SQL command to delete post revisions

Here, i would assume you know how to login to your phpMyAdmin and know how to execute SQL command. So, simply run this SQL command and all stored post revisions will be deleted.

DELETE FROM wp_posts WHERE post_type = “revision”;

Use Delete Revision Wordpress plugin

This is an easier method. Just download the Delete Revision plugin and go to your Settings->Delete-Revision to delete them.

Press the Check Redundant Revision button and the plugin will automatically search for post revisions.

Remember, both the SQL command and delete-revision plugin will delete all your post revisions, and you are not allow to choose which revesion to be deleted. So, please make sure you won’t regret after delete them!

Tips: You can turn off post revision feature by go to your wp-config.php and add define(’WP_POST_REVISIONS’, false); before the closing ?> tag.

Best Post Summary Wordpress Plugin

If you follow some popular blogs, they will publish a summary of their popular posts over a specific period. This will make sure some busy readers don’t miss their interesting articles. It may takes whole night for you to compile this summary. So, you may try to install Best Post Summary Wordpress Plugin, which is released by Aseem.

Best Posts Summary is a WordPress plugin that automatically generates a summary post of your best posts over a specified period of time based on the most popular posts in terms of number of comments or number of visits.

There are a lot of settings that you can customize to suit your needs. For example, you can set the frequency of summary post to Daily, Weekly, or Monthly. You can also create summary for certain categories by selecting them in the Selected Categories box.

Besides these, you can customize the title, number of words from text, ordering and much more. I am not going to explain each option, as the author’s page has a very detailed description for each option.

Please give this plugin a try if you want to create a summary for your posts but don’t have enough time.

How To Export Articles From A Selected Category

The Wordpress CMS comes with Export/Import feature for us to export our blog posts from one website and import to another website. However, the default Export feature only allow us to export posts from a selected author.

I found one interesting request from digitalpoint forum. The user requests someone to modify the default Wordpress files so that he can exports posts from a selected category. I had tried to modify the files, found the solution and i would like to share it with my readers (I didn’t make any profit from him and someone had already sold his solution for that guy).

We need to modify the wp-admin/export.php and wp-admin/includes/export.php. Make sure you do a backup of your Wordpress database and these two files before you continue.

wp-admin/export.php

First of all, let’s start with wp-admin/export.php. Open your with wp-admin/export.php with any text editor, and search for

if ( isset( $_GET['download'] ) ) {
export_wp( $_GET['author'] );
die();
}

Replace with

if ( isset( $_GET['download'] ) ) {
export_wp( $_GET['category'] );
die();
}

Next, search for

<table class="form-table">
<tr>
<th><label for="author"><?php _e('Restrict Author'); ?></label></th>
<td>
<select name="author" id="author">
<option value="all" selected="selected"><?php _e('All Authors'); ?></option>
<?php
$authors = $wpdb->get_col( "SELECT post_author FROM $wpdb->posts GROUP BY post_author" );
foreach ( $authors as $id ) {
$o = get_userdata( $id );
echo "<option value='$o->ID'>$o->display_name</option>";
}
?>
</select>
</td>
</tr>
</table>

Replace with

<table class="form-table">
<tr>
<th><label for="category"><?php _e('Restrict Category'); ?></label></th>
<td>
<select name="category" id="category">
<option value="all" selected="selected"><?php _e('All Categories'); ?></option>
<?php
$categories = (array) get_categories('get=all');
foreach ( $categories as $c ) {
echo "<option value='$c->term_id'>$c->cat_name</option>";
}
?>
</select>
</td>
</tr>
</table>

wp-admin/includes/export.php

Next, open your wp-admin/includes/export.php and search for

function export_wp($author='') {

Replace with

function export_wp($cat='') {

Next, search for

if ( $author and $author != 'all' ) {
$author_id = (int) $author;
$where = $wpdb->prepare(" WHERE post_author = %d ", $author_id);
}

Replace with

if ( $cat and $cat != 'all' ) {
$cat_id = $cat;
$ids = $wpdb->get_col("SELECT object_id FROM $wpdb->term_relationships WHERE term_taxonomy_id=$cat");
$where = $wpdb->prepare(" WHERE ID IN(".join(',',$ids).")");
}

Explanation

Basically, what you are doing is just replace the “author” with “category“. The default codes will query the available authors while my codes query the available categories.

The second file plays the most important role. It is a bit complicate to explain step by step. But basically, I will query the post ID that match the selected category ID and save the SQL query string in a $where variable. The $where string will be used in the subsequent codes, which we no need to modify.

I hope you guys can understand what i trying to explain. I had prepared a zip file that contains both of the modified files. You may download it and replace with the original files.

Note: I had tried this hack on Wordpress 2.6.2 only and i don’t know whether it works on other version or not. Please make a backup of these two files before you try!

Download: wp-admin.zip

Make Sure You Install Wordpress Related Posts Plugin

Wordpress Related Posts is a plugin which will generates a list of related posts base on the Wordpress tags. Placing this plugin at the end of your article will also increase your page views, because visitors like to read articles which are related to the topic they like.

There are a lot of settings which you can configure to suit your need.

This plugin let you customize the related posts title. You can configure this plugin to show Random Posts or Most Commented Posts if there is no related post found.

You may also insert related posts to your RSS feed by check the Related Posts for RSS option. If you want to place your related posts manually, make sure you uncheck the Auto Insert Related Posts. You can then call <?php wp_related_posts(); ?> in your template files to show the related posts.

I encourage new bloggers to use this plugin because it can greatly increase your page views and the most important is it will show random posts or most commented posts when there is no related post.

Download: Wordpress Related Posts Plugin