Disable comments on posts after certain comment count

Many people want to disable the post comments for some posts which has too many comments. Using simple code you can easily disable the comments for your posts which has many comments.

Here I written simple code. Using following code you can disable the comments which posts has more than 100 comments. you need to just put following code into your functions.php file.

<!--?<span class="hiddenSpellError" pre="" data-mce-bogus="1"-->php
$comment_count = 100;
function disable_comments( $posts ) {
 if ( !is_single() ) { return $posts; }
 if ( $posts[0]->comment_count > $comment_count ) {
 $posts[0]->comment_status = 'disabled';
 $posts[0]->ping_status = 'disabled';
 }
return $posts;
}
add_filter( 'the_posts', 'disable_comments' );
?>
Disable comments on posts after certain commment count in wordpress
Disable comments on posts after certain commment count in wordpress

how to stop wordpress spam comments and increase SEO

WordPress tutorial, how to stop wordpress spam comments and increase SEO. Spam comments is really major issue. Spam comments will affect your site SEO.
You should delete the spam word comments from wordpress site.

how to stop wordpress spam comments and increase SEO

If you want to prevent spam comments wordpress.  You can check more points and wordpress plugins which will be helpful for wordpress websites.

If you have approved spam comments already than you can use following SQL query to change some spam comments status.

Using following sql query you can unapprove spam comments which are already approved.


Update wp_comments set comment_approved=0 WHERE CHAR_LENGTH(comment_author_url)>35;
Update wp_comments set comment_approved=0 WHERE CHAR_LENGTH(comment_author)>30;

 

After this, you can again recheck the comments which might be spam.

For SEO of your site deleting spam word comments is good.

Here are some steps for protecting your wordpress site.

You may copy and paste the following list to the Comment Moderation box in your wp-admin/options-discussions.php page:

  • -online
  • 4u
  • adipex
  • advicer
  • baccarrat
  • blackjack
  • bllogspot
  • booker
  • byob
  • car-rental-e-site
  • car-rentals-e-site
  • carisoprodol
  • casino
  • casinos
  • chatroom
  • cialis
  • coolcoolhu
  • coolhu
  • credit-card-debt
  • credit-report-4u
  • cwas
  • cyclen
  • cyclobenzaprine
  • dating-e-site
  • day-trading
  • debt-consolidation
  • debt-consolidation-consultant
  • discreetordering
  • duty-free
  • dutyfree
  • equityloans
  • fioricet
  • flowers-leading-site
  • freenet-shopping
  • freenet
  • gambling-
  • hair-loss
  • health-insurancedeals-4u
  • homeequityloans
  • homefinance
  • holdem
  • holdempoker
  • holdemsoftware
  • holdemtexasturbowilson
  • hotel-dealse-site
  • hotele-site
  • hotelse-site
  • incest
  • insurance-quotesdeals-4u
  • insurancedeals-4u
  • jrcreations
  • levitra
  • macinstruct
  • mortgage-4-u
  • mortgagequotes
  • online-gambling
  • onlinegambling-4u
  • ottawavalleyag
  • ownsthis
  • palm-texas-holdem-game
  • paxil
  • penis
  • pharmacy
  • phentermine
  • poker-chip
  • poze
  • pussy
  • rental-car-e-site
  • ringtones
  • roulette
  • shemale
  • shoes
  • slot-machine
  • texas-holdem
  • thorcarlson
  • top-site
  • top-e-site
  • tramadol
  • trim-spa
  • ultram
  • valeofglamorganconservatives
  • viagra
  • vioxx
  • xanax
  • zolus

There are some nice plugins also which is helpful for protecting your site from spam comments.
You should activate the Akismet wordpress plugin.
Akismet is quite possibly the best way in the world to protect your blog from comment and trackback spam. It keeps your site protected from spam even while you sleep.

You should check the following option from wordpress:

Before a comment appears: (Options)

  1. Before a comment appears An administrator must always approve the comment
  2. Comment author must have a previously approved comment

If you have many spam word comments in your site then you should use sql query for delete the spam comments.

DELETE FROM wp_comments WHERE comment_content LIKE '%<a%';
DELETE FROM wp_comments WHERE comment_author LIKE '%<a%';
DELETE FROM wp_comments WHERE comment_author_url LIKE '%health%';

You should replace the spam comments words in SQL query. Using above sql query you can delete the all spam word comments.

For SEO purpose following options are very important.

how to stop wordpress spam comments and increase SEO
how to stop wordpress spam comments and increase SEO

wordpress plugins for comments enhancement

Comments is very important way doing interaction with blogger and other world. People like to reading the comments. In comments some people put review also. wordpress provides the default comment functionality with blog but some some client want extra functionality with wordpress comments.

wordpress plugins for comments enhancement

wordpress plugins for comments enhancement
wordpress plugins for comments enhancement

Here I created list of wordpress plugins which are really useful for modify the enhance the wordpress comment functionality.

List of wordpress plugins for comments enhancement

Akismet

Akismet checks your comments against the Akismet web service to see if they look like spam or not and lets you review the spam it catches under your blog’s “Comments” admin screen.

Subscribe to Comments

Subscribe to Comments is a robust plugin that enables commenters to sign up for e-mail notification of subsequent entries. The plugin includes a full-featured subscription manager that your commenters can use to unsubscribe to certain posts, block all notifications, or even change their notification e-mail address!

Live Comment Preview

This plugin uses only client-side Javascript to format a preview, it does not make any Ajax requests to the server. This provides a smooth live preview as you type.

WP-reCAPTCHA

Integrates reCAPTCHA anti-spam methods with WordPress including comment, registration, and email spam protection. reCAPTCHA is an anti-spam method originating from Carnegie Mellon University which uses CAPTCHAs in a genius way. Instead of randomly generating useless characters which users grow tired of continuosly typing in, risking the possibility that spammers will eventually write sophisticated spam bots which use OCR libraries to read the characters, reCAPTCHA uses a different approach.

Comment Highlighter

Comment Highlighter is a WordPress plugin which can be used to add different style classes to comments. There are already plugins/hacks/alterations that adds a style to all comments written by the blog owner, adds a different style to every other comment, etc. This plugin takes it a bit further.

Depending on which rules you set up, then Comment Highlighter can add style to comments based on the email of the author (of the comment), the name or the URL. These styles can furhter more be locked to a specific post ID.

Facebook Comments for WordPress

This plugin integrates the Facebook commenting system (new, old or both) right into your website. If a reader is logged into Facebook while viewing any comment-enabled page or post, they’ll be able to leave a comment using their Facebook profile.

Comment Rating Widget

This plugin is an add on to the Comment Rating plugin (version 2.9.0 or later). It displays ratings along with the most recent comments in the sidebar in formats of your design. The comment rating and images on display can be “Likes only”, “Dislikes only”, or Both. This is customizable by the “Value for comment_karma” option in Comment Rating.

Admin Commenters Comments Count

Next to all appearances of each commenter’s name in the admin, this plugin shows a count of their total number of comments, linked to a listing of those comments.

By default in WordPress, it is not possible to tell via a single glance whether a particular commenter has commented before, and if so, how many times.

WP Comment Remix

For the readers WP Comment Remix adds a number of great features that you can turn on or off, but they include:

Reply Link You can add a Reply link to each comment, which, when clicked, adds “@OriginalPoster”, and links it to the anchor of that comment. For instance, if Steve left comment #23, and you click the reply link for that comment, WP Comment Remix automatically adds:

Above wordpress plugins will enhance the user experience. Above wordpress plugins are very important for wordpress bloggers.

purabtech.in is made this list. If you want more information or you are facing any issue related wordpress coments then check our site or write to us on support@purabtech.in

Some best WordPress Hacks for theme developer

there are many wordpress theme deverlopers who are looking for wordpress hacks for theme developer. we have best collection of wordpress hacks for theme developer. Some best WordPress Hacks for theme developer.

wordpress hacks for theme developer

 wordpress hacks for theme developer
wordpress hacks for theme developer

WordPress themes market has grown incredibly. Due to lot of amazing new functionality an synchronization with all social sites.

1. Create TinyURLs with your wordpress site
Open your single.php file and paste the following in the loop:


<?php
echo 'Tiny Url for this post: <a href="'.bloginfo('siteurl').'?p=.'$post->ID.'">'.bloginfo('siteurl').'?p=.'$post->ID.'</a>'
?>

2. Use The Loop To Create An “Archive” Page Template

Create the php page called archive.php and create archive page through wordpress admin and select the archive page template from sidebar option.

In archive.php file you can following code:

<?php
/*
Template Name: Archives
*/
?>

<?php get_header(); ?>

<h2><?php $numposts = $wpdb->get_var("SELECT COUNT(*) FROM $wpdb->posts WHERE post_status = 'publish'");
if (0 < $numposts) $numposts = number_format($numposts); ?>
<h2><?php echo $numposts.' recipes published since October 06, 2008'; ?>
</h2>

<ul id="archive-list">
<?php
$myposts = get_posts('numberposts=-1&');
foreach($myposts as $post) : ?>
<li><?php the_time('m/d/y') ?>: <a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></li>
<?php endforeach; ?>
</ul>

<?php get_sidebar(); ?>
<?php get_footer(); ?>

3. Create A “Share the article with Facebook” Button
Use the following code in your loop where you want show the facebook share button.

<a href="http://www.facebook.com/sharer.php?u=<?php get_permalink();?>&t=<?php the_title(); ?>" target="blank">Share on Facebook</a>

4. Use More Than One Loop On A Page, Without Printing Duplicate Posts

If you want to use two query post in page or post. you can use following code:

<?php
query_posts('showposts=8');
$ids = array();
while (have_posts()) : the_post();
$ids[] = get_the_ID();
the_title();
the_content();
endwhile;
?>

<?php
query_posts(array('post__not_in' => $ids));
while (have_posts()) : the_post();
the_title();
the_content();
endwhile;
?>

5. Insert Ads After The First Post
If you want show the ad after first post then use the following code:

<?php if (have_posts()) : ?>
<?php $count = 0; ?>
<?php while (have_posts()) : the_post(); ?>
<?php $count++; ?>
<?php if ($count == 2) : ?>
//Paste your ad code here
<h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
<?php the_excerpt(); ?>
<?php else : ?>
<h2><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h2>
<?php the_excerpt(); ?>
<?php endif; ?>
<?php endwhile; ?>
<?php endif; ?>

There are so many wordpress tricks and hack you can found in this website. Search more.