Affichage des articles dont le libellé est Comments. Afficher tous les articles
Affichage des articles dont le libellé est Comments. Afficher tous les articles

samedi 12 novembre 2016

How to Stop Storing IP Address in WordPress Comments



After reading our article on how to allow anonymous comments, one of our readers asked us if it was possible to stop storing IP address in WordPress comments. Some site owners may want to do that to protect privacy of their users. In this article, we will show you how to stop storing IP address in WordPress comments.


Comment Privacy in WordPress


Pros and Cons of Not Storing IP Address in WordPress Comments


By default, WordPress logs and stores IP addresses of users leaving comments on your website. These IP addresses are permanently stored in your database.


The reason for storing IP addresses with each comment is to help site owners combat with unwanted comments or spam. Plugins like Akismet can block comments from IP addresses known to be exploited by spammers.


Unless your users are using a VPN service, their real IP addresses can still be found in your site logs. Most WordPress hosting providers keep an access log of all visitors to your website for a limited period of time.


On the other hand by not storing IP address in WordPress comments, you can improve privacy of commenters on your website. They may feel more confident about expressing their opinions knowing that your site doesn’t store IP addresses with comments.


Method 1: Stop Storing IP Addresses in Comments with Plugin


This method is easier and recommended for new websites and beginners.


First thing you need to do is install and activate the Remove IP plugin. For more details, see our step by step guide on how to install a WordPress plugin.


Once activated, the plugin will replace user IP with 127.0.0.1, which is an IP address typically used by localhost.


The plugin will not delete IP addresses stored with older comments. If you have older comments with IP addresses stored with them, then you may want to delete those IP addresses as well. We will show you how to do that later in this article.


Method 2: Manually Stop Storing IP Addresses with WordPress Comments


If you are comfortable pasting code snippets in WordPress, then you should use this method instead.


Simply add this code to your theme’s functions.php file or a site-specific plugin.



function wpb_remove_commentsip( $comment_author_ip ) {
return '';
}
add_filter( 'pre_comment_user_ip', 'wpb_remove_commentsip' );

This is basically the same code used by the plugin we mentioned in the first method. However, instead of storing 127.0.0.1, it leaves the IP field blank.


Remove IP Address From Old Comments


Regardless of which method you use to stop storing comments IP, old comments on your WordPress site will always have IP addresses stored with them.


If you have old comments on your site, then you may want to remove IP addresses from those comments.


We will show you how to do that by running a MySQL query on your WordPress database. It is really important to make sure that you have the most recent WordPress database backup.


Next you need to login to your WordPress hosting control panel and look for phpMyAdmin.


Make sure that you have selected your WordPress database by clicking on the database name in the column on your left hand. After that you need to click on the SQL menu.


Removing IP address from old comments in WordPress


This will bring you a text area where you need to enter this query:



UPDATE 'wp_comments' SET 'comment_author_IP' = '';

Click on the Go button below the textarea to run your query. That’s all, it will remove all IP addresses stored with comments in WordPress database.


Note: if you have a custom WordPress database prefix, then please adjust the wp_comments to your custom table prefix.


We hope this article helped you learn how to stop storing IP address in WordPress comments. You may also want to see our guide on how to add ask me anything anonymously in WordPress.


If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.


The post How to Stop Storing IP Address in WordPress Comments appeared first on WPBeginner.







How to Change the “Reply” Text in WordPress Comments



Recently, one of our users asked us how to change the ‘Reply’ text in WordPress comments. By default, most WordPress sites have a reply button below comments so that users can respond to a comment. In this article, we will show you how to easily change the “Reply” text in WordPress comments.


Changing reply text in WordPress comments


Why Change The Reply Text in WordPress Comments?


Comments are an easy way to boost user engagement. There is a lot you can do to improve WordPress comments.


For example, you can style your comment layout, change comment form style, comment text field to bottom, etc.


The reply link below a comment is like a call to action. Just like any other call for actions on your website, language, colors, size, and placement can all compel users to click.


By changing the simple boring reply to something more interesting, you can make it more prominent and attractive.


Let’s see how to easily change ‘Reply’ text in WordPress comments.


Changing ‘Reply’ Text in WordPress Comments


For this tutorial, you will need to add some code to your WordPress files. If you have not done it before, then you may want to take a look at our beginner’s guide to pasting snippets from the web into WordPress.


You need to add the following code to your theme’s functions.php file or in a site-specific plugin.


 
function wpb_comment_reply_text( $link ) {
$link = str_replace( 'Reply', 'Change to This Text', $link );
return $link;
}
add_filter( 'comment_reply_link', 'wpb_comment_reply_text' );


Don’t forget to replace ‘Change to This Text’ in the code with whatever text you want to use.


Preview of reply text changed to respond


That’s all, you can now view any post with comments on your website, and you will find the text you added instead of ‘Reply’.


We hope this article helped you change the “Reply” Text in WordPress. You may also want to try these 11 ways to get more comments on your WordPress blog posts.


If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.


The post How to Change the “Reply” Text in WordPress Comments appeared first on WPBeginner.







Pros and Cons of Enabling Comments on Your Blog



alt="Pros and Cons of Enabling Comments on Your Blog" src="http://whsr.webrevenueinc1.netdna-cdn.com/wp-content/uploads/2013/12/comment-wordpress-plugin-500-500x327_c.jpg" />

There are as many opinions on whether you should enable comments on your blogs as there are bloggers to write about the topic. We’re going to cover both the pros and cons of comments on a blog so that you can decide what works best for you.

In making the decision to have comments, you have to be prepared for the fact that not everyone is going to agree with what you write; especially if you’re writing on a topic that invites a wide array of opinions, such as politics, religion, or op-ed pieces. As a site owner, you make the decision, ahead of time, whether you want readers dropping in and leaving their own views, or even disagreeing with you on yours (sometimes vehemently!). – href="http://www.dummies.com/how-to/content/deciding-whether-to-allow-comments-on-your-wordpre.html" target="_blank">For Dummies

Pros of Enabling Comments

There are some people who feel that a blog isn’t really bloggish if it doesn’t have comments enabled. The idea behind blogs is that readers peruse your material and then add their own thoughts and input. If you  like the idea of a more traditional blog, then enabling comments, at least on some of the posts, is probably the way to go. Nancy Messieh wrote an article on href="http://www.makeuseof.com/tag/should-you-allow-comments-on-your-site/" target="_blank">MakeUseOf where she points out that two of the newer blogging platforms, Roon and Medium (by Twitter), do not even have a comments feature. However, she points out that there are some pros to allowing comments, such as creating a href="http://www.webhostingsecretrevealed.net/blog/blogging-tips/grow-a-blog-community/">sense of community She also added:

Allowing your visitors to comment on your blog or site opens you up to constructive criticism. Your readers can leave you tips for improvements, ideas for article topics, feedback, and more.

Cons of Enabling Comments

On the other hand, enabling comments can open you up to spam or just plain crazy posters. If your blog is extremely popular, you may find that the time it takes to read and approve and respond to reader comments if more than you have available as a busy business owner. Hiring a full-time staff person just to deal with blog comments isn’t feasible for most blog owners, either. Corbett Barr over on href="http://fizzle.co/sparkline/debate-should-you-allow-comments-on-your-blog-find-out-what-two-remarkably-popular-bloggers-think" target="_blank">Fizzle took a look recently at two extremely popular blogs that have chosen to turn off their comment features, Zen Habits and Seth Godin. He then interviews two successful bloggers. One blogger believes comments should be enabled for the sense of community and the other blogger believes they should be disabled because the comments eat into his time and creativity. href="http://lizwillis.com/should-you-allow-comments-on-your-blog/" target="_blank">Liz Willis makes a couple of interesting points on her blog about reasons to disable comments.

(1) Allowing comments may not always be in the best interests of one’s overall content strategy, and (2) moderating and managing comments may not always be the best use of one’s time.

The Answer Is There Isn’t One Answer

id="attachment_8242" style="width: 760px" class="wp-caption aligncenter">class=" wp-image-8242 " alt="Comment on your blog" src="http://whsr.webrevenueinc1.netdna-cdn.com/wp-content/uploads/2013/12/comment-wordpress-plugin-500.jpg" width="750" srcset="http://whsr.webrevenueinc1.netdna-cdn.com/wp-content/uploads/2013/12/comment-wordpress-plugin-500.jpg 500w, http://whsr.webrevenueinc1.netdna-cdn.com/wp-content/uploads/2013/12/comment-wordpress-plugin-500-300x196.jpg 300w" sizes="(max-width: 500px) 100vw, 500px" />class="wp-caption-text">Image credit: href="http://www.flickr.com/photos/31878512@N06/4704140020/">Neal

As you can see, there is quite a debate raging online about whether a blog is still a blog if comments are disabled. href="http://www.problogger.net/archives/2006/02/08/blogging-with-or-without-comments/" target="_blank">Darren Rowse, founder and editor of ProBlogger, is someone who knows blogging inside and out. Rouse takes a look at the great debate on whether to allow comments or not. Rouse doesn’t actually take a side, but he does make some points that bloggers should consider, such as not changing the rules halfway through the game (either allow comments or don’t allow comments and try to stick to it or offer a good reason why you aren’t). Rouse makes a point about disabling comments that bloggers should take note of. He says:

Not having comments can actually be an advantage – One of the bloggers that I read daily who uses his lack of comments to his advantage is Seth Godin. While I personally find it frustrating not to be able to tell Seth what I think at the end of posts the advantage for him is that he gets a lot of people linking to his posts because their comments happen on their own blogs.

This is an excellent point, because people will talk about articles they feel strongly about. If they can’t comment on your blog, they may also share the link to your article on social media and add their comment to Facebook or Twitter. This can generate new readers for you.

The Best of Both Worlds

One thing that several of my clients who have blogs have done that I think is extremely effective is to turn the comments off for some posts and enable them for others. Let’s say you want to get info out about an upcoming event that clients are invited to. You probably will want to enable comments for that post in case customers need directions or have questions. On the other hand, if you are simply releasing info on a prototype of an upcoming product, but are not yet ready to answer questions because it won’t be available for six months, then you could disable comments for that post.

In addition, the WordPress platform allows you to turn off comments for sections of your site. For example, you might want discussion on posts but not on pages, such as your About Us or Company History page. Some plugins that work for this include:

  • href="http://wordpress.org/plugins/disable-comments/" target="_blank">Disable Comments – Allows you to disable comments on portions of your site, such as pages.
  • href="http://wordpress.org/plugins/pmc-disable-comments/" target="_blank">PMC Disable Comments – You can disable specific posts with this plugin.
  • href="http://wordpress.org/plugins/cackle/" target="_blank">Cackle Comments – This comments plugin actually lets users leave a comment via their social media. This accomplishes two things. First, you can enable comments while still collecting visitor info, which cuts down dramatically on spam. Second, the user is more likely to share your post on their social media since they are already logged in.

How to Cut the Comment Spam

Some people choose to disable comments because of the massive amounts of spam. These comments are typically very generic in nature, add nothing to the discussion and promote a website or product. Typically, the product is not one you would want associated with your business.

Fortunately, you can cut down on comment spam dramatically by enabling Askimet and setting up spam comments to be deleted automatically. You can also add some controls to your WordPress blog under settings that state that someone who has had a comment approved previously does not need moderation. This can save you time. If you have regular site visitors who enjoy adding intelligent discourse to your blog, their comments will post without you having to do anything.

To enable Askimet, you will need to install the plugin if it isn’t already on your blog (most WordPress blogs install with Askimet already enabled. Then, you will need to go to the href="http://akismet.com/?return=true" target="_blank">Askimet website and sign up (it’s free for most personal blogs) for a WordPress key. You then input this key into your Askimet plugin under settings. That’s all you need to do. Set it and then it runs in the background pushing all spam posts into a special folder.

You may also want to add the plugin called href="http://wordpress.org/plugins/spam-free-wordpress/" target="_blank">Spam Free WordPress. Todd Lahman’s spam plugin blocks the automated comment spam altogether.

The Bottom Line

Having an active, interactive and reader-oriented blog is a good idea. As Jerry Low wrote in his article href="http://www.webhostingsecretrevealed.net/blog/wordpress-blog/wordpress-how-to-developing-a-comments-php-file/" target="_blank">Developing a Comments.php, a successful site promotes interaction between readers and writers.

This interaction is not only the key to a website’s own, self-perpetuating success, but common user interactions helps communicate website activity and authority to search engines which specifically rank websites based on how appreciative visitors are of the content they find there.

Fortunately, you have a lot of options when it comes to interacting with readers. Whether you choose to enable comments on everything, only on some posts, or disable them all together and take to social media for discussion, the important thing is to find the right fit for your site and your particular readers.


Page 16 – Web Hosting Secret Revealed