How to Change the Gravatar Image Size in WordPress

Recently one of our readers asked if it is possible to change the Gravatar image size. The answer is yes. In this article, we will show you how to change the Gravatar image size in WordPress. Gravatar is a globally recognized avatar that connects a… Read More »

The post How to Change the Gravatar Image Size in WordPress appeared first on WPBeginner.

Recently one of our readers asked if it is possible to change the Gravatar image size. The answer is yes. In this article, we will show you how to change the Gravatar image size in WordPress.

How to Change Gravatar Image Size in WordPress

Gravatar is a globally recognized avatar that connects a user’s email address with their picture. Popular applications like WordPress and others use it to display user’s photo on the website.

Most WordPress themes by default add a Gravatar next to each user comment. Some even use it for the author bio box.

Let’s take a look at how you can change the Gravatar image size on your WordPress site.

Note: Since Gravatar Image size is defined by your theme, you would need to edit your theme files to change it.

Change Gravatar size for WordPress Comments

The first thing you need to do is open the comments.php file located in your themes folder.

You would need to connect to your website using FTP and then go to /wp-content/themes/yourtheme/.

Alternatively if your WordPress hosting company offers a File Manager, then you can edit this file using the web interface in your cPanel.

In the comments.php file, you need to find the following code: avatar_size

It will be inside the wp_list_comments function like this:

<?php
wp_list_comments( array(
	'style'       => 'ol',
	'short_ping'  => true,
	'avatar_size' => 32,
) );
?>

Simply change the size to whatever dimensions you like. Gravatars are square, so the value you set will be the same for both width and height.

Go ahead and save your changes. If you are using FTP, then upload the changes to your server.

Now open a post that has comments to see if your changes are live.

If it is not, then your theme’s CSS is overriding it. The best way to check is to use Inspect Elements tool in your browser.

Simply right click on the Gravatar in your browser and click Inspect Element.

Inspect Element Comments Gravatar

You need to look at the height and width of the Gravatar image to see if it reflects the value that you set.

When you bring your mouse over it, it will also highlight the gravatar on the image and show you the size it’s actually displaying.

Gravatar Image Size WordPress

You’ll notice that the two are different. This means that your theme’s style.css file is overriding the default image size. Many themes including the default Twenty Sixteen theme use CSS to control the Gravatar image size for different screen sizes.

You need to open the style.css file in your theme’s folder and search for avatar. You’ll likely find a CSS class: .comment-author .avatar which contain a code like this:

.comment-author .avatar {
	height: 42px;
	position: relative;
	top: 0.25em;
	width: 42px;
}

Go ahead and change the width and height to match the value you set earlier in the comments.php file.

That’s all. You have successfully changed the gravatar image size in your WordPress comments.

Now you might be wondering if you can override the image size using CSS, then why did we change the avatar_size in the comments.php file?

Yes, while you can take the CSS shortcut, there are two benefits to doing it this way:

1. No blurry images

If you wanted to resize the WordPress Gravatar and make it larger then the default image size, then it will look blurry.

2. Faster Load Times

Now if you wanted to make the Gravatar smaller then the default image size, then the CSS only method will look just fine.

However by changing the size in comments.php, you’re actual image is smaller thus reducing the page size and improving your site speed.

Change Gravatar size for Author Bio

Depending on the theme that you use, it may also use Gravatar for author bio boxes. You can change the default gravatar size in a very similar way as comments.

You need to locate the theme file which adds the bio. It could be in the single.php file, functions.php file, or even as a separate template part file. The default Twenty Sixteen theme uses the template part file called biography.php.

When searching the files, you need to look for the code get_avatar.

For the sake of this example, we will use TwentySixteen default theme as an example. In the themes folder:

/wp-content/themes/twentysixteen/template-parts/biography.php file

It reads like this:

$author_bio_avatar_size = apply_filters( 'twentysixteen_author_bio_avatar_size', 32 );

echo get_avatar( get_the_author_meta( 'user_email' ), $author_bio_avatar_size );

You will just have to change the number 32 to whatever you like.

In other themes, the code may look like this:

get_avatar( get_the_author_meta( 'user_email' ), 32);

After you change the size, refresh the page to see if the size updated. If not, then you’d need to search for the avatar class in the style.css file like we showed for comments, and update the size there as well.

We hope this article helped you change the gravatar size in WordPress. You may also want to see our guide on 25 most common WordPress errors and how to fix them.

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 Gravatar Image Size in WordPress appeared first on WPBeginner.

11 Ways to Get More Comments on Your WordPress Blog Posts

Do you want to get more comments on your blog posts? We often get asked about tips on increasing comments on WordPress blog posts. In this article, we will share 11 ways to get more comments on your WordPress blog posts. 1. Get a Better… Read More »

The post 11 Ways to Get More Comments on Your WordPress Blog Posts appeared first on WPBeginner.

Do you want to get more comments on your blog posts? We often get asked about tips on increasing comments on WordPress blog posts. In this article, we will share 11 ways to get more comments on your WordPress blog posts.

Getting more comments to build user enagement in a WordPress blog

1. Get a Better WordPress Hosting

Comments are resource intensive. Each time a user submits a comment on your WordPress site, your server runs a PHP script. If multiple users are submitting comments at the same time, this could slow down your site.

You will need to make sure that your WordPress hosting provider can handle it. If you have a larger site, then try a managed WordPress hosting provider like WPEngine for better speed.

2. Use Comment Moderation Instead of Captcha

Adding CAPTCHA to block spam is an effective way to deal with comment spam.

However, CAPTCHA is not user-friendly, and it discourages regular users from commenting.

Instead of using CAPTCHA, you should enable comment moderation on your site and manually approve each and every comment (if you have to).

Comment moderation will not only allow you to block spam, it will also provide you a chance to interact with your users more often.

See our beginner’s guide on how to moderate comments in WordPress for detailed instructions.

3. Allow Users to Subscribe to Comments

By default when a user leaves a comment on your website, they will have to bookmark the link to come back and see if there is a new comment on the article.

If they forget to bookmark or can’t remember the name of your blog, then they will probably never come back again.

You can provide users a chance to subscribe to comments on your WordPress posts. This way they can get immediate notifications when there is a new comment.

This will significantly increase your pageviews and number of comments on your website. Your users will find discussions on your site to be more engaging.

Subscribe to comments

Take a look at our guide on how to allow users to subscribe to comments in WordPress.

4. Notify Users on Replies to Their Own Comments

When a user leaves a comment on your site, there is no way for them to find out if anyone has replied to their comment. They will have to bookmark the page and visit it later. Most users will not do that.

You can easily allow users to subscribe to their own comments. This way they will ONLY receive a notification email when someone replies to their comment.

If you make it a habit to reply to most user comments on your site, then this could develop a highly engaging community around your blog.

For detailed instructions check out our tutorial on how to notify users on replies to their own comments in WordPress.

5. Show Newest Comments First

By default WordPress shows the newest comment at the bottom of the comments list. Now if you have lots of comments on a post, then users will be seeing the oldest comments on top.

This can be easily changed in WordPress.

Simply go to Settings » Discussion and scroll down to other comments settings section. You need to select newer from the drop down menu.

Show newer comments first in WordPress

For more details, take a look at our tutorial on how to rearrange comments in WordPress – Display the most recent one on top.

6. Turn on Comments for Old Posts

Most bloggers turn off comments on older posts to reduce comment spam. However, there will be lots of users who might want to comment on these posts.

Since you are already using comment moderation, you can safely turn on comments on old posts.

Simply go to Settings » Discussion and scroll down to other comments settings section. Uncheck the box next to ‘Automatically close comments on articles older than X days’.

Turn on comments on older posts

7. Showcase Your top Commenters

A good way to encourage and appreciate your most loyal users is by highlighting your top commenters. This shows users that they are part of your blog’s community, and you appreciate their effort to bring life into your comments.

Simply install and activate the Top Commenters Widget plugin. Upon activation, go to Appearance » Widgets page and add Top Commenters Widget to a sidebar.

Top commenters widget settings

For more detailed instructions, please see our guide on how to display your top commenters in WordPress sidebar.

8. Display Recent Comments

When users are looking at your homepage, they have no idea what’s happening in your blog’s comments section. For example, there may be a heated debate going on a new post where a user may want to chime in.

You can provide users a chance to look at current discussions by showing recent comments on your site.

Simply go to Appearance » Widgets and add Recent Comments widget to a sidebar.

Adding recent comments widget in WordPress

9. Allow Users to Rate and Share Comments

The default WordPress commenting system is plain and simple. It does not have the social, gamification, and user engagement elements of a modern discussion platform. However, you can easily add these features in WordPress using plugins.

Simply install and activate the De:comments plugin. Upon activation the plugin will beautifully transform your WordPress commenting system into a highly engaging discussion platform.

De:comments preview

De:comments comes with features like voting, user awards, social sharing, comment subscription, and many more. It will save you from installing some other plugins mentioned in this article.

See our detailed tutorial on how to improve WordPress comments with De:comments.

10. Notify Users When Their Comment is Approved

When a user submits a comment on your blog, WordPress shows them that their comment is awaiting moderation. The users have no idea when you approve their comment or delete it.

You increase your pageviews as well as user engagement by simply notifying users when their comment is approved.

Simply install and activate the Comment Approved plugin. Upon activation, go to Settings » Comment Approved page to configure the plugin.

Comment Approved Settings

For detailed instructions see our tutorial on how to notify users when their comment is approved in WordPress.

11. Reply to User Comments

This should go without saying, but if you want to get more comments, then you will need to actively take part in discussions on your website.

This means you need to reply to as many user comments as possible.

You can easily take a look at comments that you can reply by installing and activating the DX Unanswered Comments plugin. It will allow you to filter and see comments that are unanswered.

See our tutorial on how to filter unanswered comments by admin in WordPress.

We hope this article helped you get more comments on your WordPress blog. You may also want to see our list of 40 useful tools to manage and grow your WordPress blog.

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 11 Ways to Get More Comments on Your WordPress Blog Posts appeared first on WPBeginner.

How to Remove NoFollow From WordPress Comments

By default WordPress automatically adds a nofollow tag to all links in the comments. Recently one of our readers asked if it was possible to remove the nofollow from WordPress comments? In this article, we will show you how to remove nofollow from WordPress comment… Read More »

To leave a comment please visit How to Remove NoFollow From WordPress Comments on WPBeginner.

By default WordPress automatically adds a nofollow tag to all links in the comments. Recently one of our readers asked if it was possible to remove the nofollow from WordPress comments? In this article, we will show you how to remove nofollow from WordPress comment links and explain the pros and cons of doing so.

What is NoFollow?

In 2005, Google introduced rel=”nofollow” attribute for links. This attribute simply instructs search engines that you do not endorse the mentioned links.

<a href="http://www.example.com" rel="nofollow">Example Link</a>

nofollow tag in WordPress comment links

Why is NoFollow Automatically Added in WordPress Comments?

In the earlier days, one of the easiest ways to build backlinks and manipulate SEO was to comment on blogs for backlinks. This increased the number of spam comments.

The purpose of nofollow tag was to make blog comments less effective for SEO manipulation.

Since the main motivation for comment spam was to get backlinks, the nofollow would demotivate spammers.

That’s why WordPress implemented rel=nofollow to be automatically added to all links in the comments.

Good or Bad?

Adding nofollow to all outgoing links in comments provided blog owners some peace of mind. Now if a spam comment accidentally gets published, it will automatically be nofollow.

However, nofollow attribute did not get rid of comment spam altogether. Spammers simply didn’t care, and they assumed that even a nofollow link is worth something.

On the other hand, it discouraged some bloggers and readers from commenting because they felt they weren’t getting any value for contributing to your article.

Should You Disable NoFollow in WordPress Comments?

The reason why some site owners may want to disable nofollow is because they want to encourage more comments.

Making links dofollow may increase the number of comments, but it will also increase comment spam.

WordPress runs a PHP script when someone submits a comment. More comments means more instances of PHP script running on your server. This could also slow down your website, and your WordPress hosting provider may not be able to handle the load.

Most comment spam is submitted by spambots and can be easily caught with Akismet. However with nofollow disabled, you will get a lot more low quality comments submitted by actual human users.

You will be spending more time moderating comments than writing actual content on your site.

We recommend against turning off nofollow for blog comments. As a matter of fact, we recommend that you even add nofollow to external links from your blog posts that you do not endorse (see how to add title and nofollow to insert link popup in WordPress).

Should you still want to proceed and want to remove nofollow from WordPress comments, here is how you can do it.

Disabling Nofollow in WordPress Comments

First thing you need to do is install and activate the Remove Nofollow plugin. Upon activation, you need to visit Settings » Remove Nofollow to configure plugin settings.

Nofollow plugin settings

Remove Nofollow plugin allows you to remove nofollow from entire comments or just from comment author link. You can also dofollow both options.

Once you have made your selection, click on the update options button to save your settings.

You can now test this by going to your website and using the inspect element tool on any comment.

A dofollow link in WordPress comments

We hope this article helped you learn how to remove nofollow from WordPress comments. You may also want to see our list of 12 vital tips and tools to combat comment spam 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.

To leave a comment please visit How to Remove NoFollow From WordPress Comments on WPBeginner.

16 Best Plugins to Improve WordPress Comments

Comments are an integral part of many WordPress blogs as an effective way to engage users and build community. The default WordPress commenting system is good but it is quite plain and basic. However, you can extend the this basic commenting system into a powerful… Read More »

To leave a comment please visit 16 Best Plugins to Improve WordPress Comments on WPBeginner.

Comments are an integral part of many WordPress blogs as an effective way to engage users and build community. The default WordPress commenting system is good but it is quite plain and basic. However, you can extend the this basic commenting system into a powerful user engagement platform for your website. In this article, we will show the best plugins to improve WordPress comments and take them to the next level.

1. De:comments

Preview of De:comments enabled comments in WordPress

De:comments is an all in one plugin to totally transform your WordPress commenting system. It allows users to vote and downvote comments, share invidiual comments, login with existing social accounts, embed images, Gifs, videos, tweets, and more. Take a look at our detailed guide on how to improve WordPress comments with De:comments.

2. Yoast Comment Hacks

Yoast Comment Hacks

Yoast Comment Hacks is a suite of tools that helps make comment management easier. It allows you to email comment authors from WordPress, email all users who commented on a specific post, provide cleaner comment notification email, redirect first time commenter to a thank you page, assign comments to a specific thread, and more. Take a look at our guide on how to install and setup Yoast Comment Hacks for WordPress.

3. Basic Comment Quicktags

Basic comment quicktags in a comment form

This plugin simply adds quicktag buttons in WordPress comment form’s textarea. This allows users to quickly add links, make text bold or emphasized, and add blockquotes by pressing the buttons. See out tutorial on how to add quicktags in WordPress comment form.

4. Subscribe to Comments Reloaded

Subscribe to Comments

Comments are a powerful way to build communities. But how would people know if there is a new comment after they read your post? Subscribe to Comments Reloaded allows users to subscribe to comments and receive instant email notifications whenever there is a new comment on the article. Users can unsubscribe at any time and manage their own subscriptions on your site. We have detailed tutorial on how to allow users to subscribe to comments in WordPress with more details.

5. Simple Comment Editing

Simple comment editing

Sometimes when a user submits a comment, they immediately realize they have made a spelling mistake or some other error. Simple Comment Editing provides a users a flexible time during which they can edit their own comments on your site. For more details, take a look at our tutorial on how to allow users to edit comments in WordPress.

6. No Page Comment

Disable comments on pages and media attachments

By default, WordPress would show a comment box on your pages and even media attachments. You can edit a page and turn off comments. But if you have many pages, then it becomes a chore. No Page Comment plugin allows you to easily switch off comments for your pages and media attachments in WordPress. For more instructions, check out our tutorial on how to turn off or disable comments in WordPress pages.

7. oEmbed in Comments

oEmbed in WordPress comments

WordPress allows you to easily embed videos, tweets, and much more by simply pasting the URL in the post editor. However, if a user posted a YouTube video URL, Flickr photo, or a tweet URL in the comments it would appear just as text. oEmbed in Comments plugin enabled the oEmbed functionality for WordPress comments as well. This allows your users to easily embed videos, gifs, photos, tweets, status updates, from a large variety of oEmbed supported providers. Take a look at our guide on how to add videos and more in WordPress comments with oEmbed.

8. Moderator Role

Adding a moderator user role in WordPress

Comment moderation can become very time consuming for large and busy websites. Moderator Role plugin allows you to assign the moderator role to your community members, staff or loyal users. This will give them access to comment moderation area in WordPress and they will be able to approve comments on your site. Take a look at our guide on how to allow blog users to moderate comments in WordPress for more details.

9. Tako Movable Comments

Sometimes you may want to create a new version of an older post on your site. While you can easily copy paste content from old post to new, there is no easier way to move the comments. Tako Movable comments allows you to move comments from one post to another. See our tutorial on how to move comments between WordPress posts for more detailed instructions.

10. Comments Since Last Visit

A new comment highlighted in WordPress

This plugin is available from GitHub see our guide on how to install WordPress plugins from GitHub. Comments Since Last Visit simply adds a class to the new comments since a users last visit to the post. It sets a cookie when the user visits a post for the first time. On next visits it compares the dates and adds the CSS class to new comments. See our step by step tutorial on how to highlight new comments for returning visitors in WordPress.

11. Featured Comments

Feature or bury comments

Not all comments on your website are equal. Some comments add value to the discussion and some derail the conversation. Featured Comments allow you to feature high quality comments and bury irrelevant comments. See our tutorial on how to feature/bury comments in WordPress for more details.

12. Comment Approved

Comment Approved notification settings

Comment moderation is the most reliable way to deal with comment spam. However, when a user leaves comment, they don’t get notified when their comment is published. Comment Approved plugin sends email notification when you approve a new comment. We have more detailed instructions in our guide how to notify users when their comments is approved in WordPress.

13. DX Unanswered Comments

Unanswered Comments

Comments are good for user engagement but you need to communicate with users by answering their comments. Unanswered Comments plugin allows you to easily filter unanswered comments. You can sort comments and then reply to all comments. See our article how to filter unanswered comments in WordPress for more details.

14. WordPress Comments Fields

Comment Form Custom Fields

By default, the comment area shows 4 fields (name, email, website address, and message). Comment Form Custom Fields allows you to add more fields to your WordPress comment form. The plugin will display the data submitted through custom fields as comment meta. See our step by step tutorial on how to add custom fields to comments form in WordPress.

15. Send email only on Reply to My Comment

Subscribe to comment replies

This plugin allows users to subscribe to comments and receive notifications when someone replies to their comments. This is helpful for users who just want to receive notifications for just their own comments. See this tutorial on how to notify users only on replies to their WordPress comments.

16. Control Comment Length

Control Comment Length

By default WordPress comments have no limit. Users can leave very small comments which make no sense at all, or spammers can leave very long comments. Recently, it was discovered that some hackers tried to hide their malicious code in extremely lengthy comments which executed when the comments were viewed on the admin screen. Control Comment Length allows you to set minimum and maxium character limits for comments in WordPress. See our tutorial on how to limit comment length in WordPress for more details.

We hope this article helped you find the best plugins to improve WordPress comments. You may also want to take a look at our guide on 12 vital tips and tools to combat comment spam 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.

To leave a comment please visit 16 Best Plugins to Improve WordPress Comments on WPBeginner.

How to Write a Good Blog Comment and Bypass the Spam Filter in WordPress

Have you ever thought about what makes a good blog comment? Want to know of a sure-fire way to bypass the spam comment filter in WordPress? In this article, we will show you how to write a good blog comment and bypass the spam filter… Read More »

To leave a comment please visit How to Write a Good Blog Comment and Bypass the Spam Filter in WordPress on WPBeginner.

Have you ever thought about what makes a good blog comment? Want to know of a sure-fire way to bypass the spam comment filter in WordPress? In this article, we will show you how to write a good blog comment and bypass the spam filter in WordPress.

Comments are a great way to interact with the blogs you read. Most site owners love and crave comments. In their eyes, comments show that readers found their content engaging and useful.

Sadly, comments are now being used by spammers and bots as a promotional mechanism rather than a micro-conversation tool. We get tons of comments here on WPBeginner, and those that stand out share several common traits.

Let’s take a look at how to write a good blog comment and get noticed.

1. Why Do You Want to Comment?

Why?

Before you leave a comment, you need to ask yourself why do you want to leave that comment? Some people want to become friends with the blog owner to explore networking opportunities. Others may just want to say thank you, while some might disagree and want to express their own views.

Think out loud what you want your comment to accomplish before you write it. This will help you gather your thoughts more precisely and will allow you to be more eloquent.

2. Be Respectful and Courteous

Respect

It goes without saying that if you want to be heard and noticed, then you should be polite, respectful, and kind.

Even if you disagree with the post, you should express your views without being rude to the site owner or other users.

Remember the site owner can delete your comment, mark it as spam, and/or block your IP altogether.

Friends and good manners will carry you where money won’t go.

– Margaret Walker

3. Don’t Comment for a Backlink

Backlink

Comments with backlinks in the message are more likely to be marked as spam.

Some users try to leave signature links to their site in their comments. This is a waste of your time, and more likely than not your comment will be caught by a spam filter or in a moderation queue.

First of all, you need to understand that all links in blog comments are nofollow by default. You will not get the SEO bump that you are hoping for.

Second, why waste your time writing comments when you can get featured on any blog in the world. If you have great writing skills and all you want is publicity, then writing guest posts will benefit you a lot more than leaving backlinks in comments.

If you must leave a link, then make sure that it is relevant to the post. Self-promotional links are usually deleted unless you’re a regular user of the website.

4. Add Value to The Discussion

Add Value

When writing your comment, your #1 goal should be to add value to the original discussion. There are plenty of ways to do that.

For example, if you are commenting on a list post, then add more information about an item already in the list or perhaps suggest an alternative item.

Asking relevant questions can help other readers, and it is also the easiest way to add value to a discussion. However, you need to be smart about it and only ask if you really have a question.

It’s crucial that you read the comments that are already published. This will give you an idea of where the conversation is heading, and you would avoid repeating the things that others have already said.

5. Spellcheck and Proofread

Spellcheck & Proofread

You should never use ALL CAPS in your comment (that’s simply rude).

Some site owners are very strict about grammar and spelling, so you may want to do your best there.

All browsers come with built-in spell-check tools that you can use to correct mistakes as you write. You can also install Chrome extensions like Grammarly or After the Deadline to proofread your comments.

6. Retweet, Share, and Reblog

Share and Reblog

If you think of a post worthy enough of your comment, then why not share it with the rest of the world. Tweet a link to the post or your own comment. You can also share it on Facebook or reblog on your own blog. This also allows you to get more people involved in the discussion.

It also shows the site owner that you liked their article, and you care. It’s one of the great ways to start networking with an influencer and get in their radar.

7. Private Feedback

Feedback

Comments are supposed to be about the article and post you are reading. If you want to address the site owner or have another suggestion, then it’s best to use the contact form instead of leaving it all in the comment.

It’s a bonus when you leave a great comment and then send helpful feedback through the contact form. Two quick touch-points can go long way in helping you get noticed by the writer.

We hope this article helped you learn how to write a good blog comment and hopefully your comments will bypass the spam filters. You may also want to see our free WordPress beginner workshop recordings.

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.

To leave a comment please visit How to Write a Good Blog Comment and Bypass the Spam Filter in WordPress on WPBeginner.