Highlighting Author’s Comments in WordPress

Nadejda

· 08th April 2021·Wordpress

Excerpt

Are you looking for e new way to build engagement with readers? Why don’t you try highlighting the author’s comments?

Highlighting Author’s Comments in WordPress

Are you looking for e new way to build engagement with readers? Why don’t you try highlighting the author’s comments? When users notice that the author participates more frequently in discussions the chances that they might comment on your post are higher.

Why do you need to highlight author’s comments?

This is a great way to make users more engage with your content. If you are looking to get more comments on posts, you can achieve this by being more active in discussions.

If you are just starting your WP blog, you can reply to comments during moderation. If you have a multi-author blog, encourage writers to participate as well.

In most WP themes, however, there is no way to distinguish between comments as they are often listed in the same style.

author’s comments

Readers may not even notice the author’s contribution to the discussion. By highlighting it, you are making their comments stand out more and gathering more attention.

The idea is to make users more engaged with your content and even subscribe to your newsletter.

How to highlight author’s comments?

The best and easiest way to achieve this is by using custom CSS to your theme. This way, you can add the code and even see a preview.

Go to Appearance – Customize from the admin dashboard. You will see some options on the left side along with a live preview.

Appearance – Customize

Click on Additional CSS. You will now see a text area where you need to add the custom CSS.

Additional CSS

In order to see how the CSS will look like, you have to navigate to a blog post containing some comments by an author.

CSS

Now, go to the comments section and add this code:

code

You will see the changes immediately.

changes

Depending on the WordPress theme you are using, WordPress adds certain classes to specific areas of your site.

With this code, we are using the .bypostauthor CSS class, adding it to comments made by the post author.

To make it even more prominent, add some more CSS styles.

bypostauthor

It should now look like this:

example

How to highlight comments by user roles?

Often WP blogs have people in charge of answering comments. With more popular sites, everyone including authors, admins and moderators participate in the discussions.

But how to highlight comment, left by a staff member?

You need to add custom code to your site. Add the code bellow to the code snippets theme or plugin’s functions.php file.

highlight comments by user roles

It’s used to add the user role label right next to the comment author’s name.

user role label

If you want to add some extra dazzle to the style, go to Appearance – Customize and switch to the Additional CSS tab.

Now, enter the following code:

Additional CSS

This is how it should look like. Note, that you can make any changes to the code in order to match your theme’s style.

Additional CSS  look

We hope today’s post was helpful in teaching you how to properly highlight authors comments in WP.

Nadejda
Nadejda Milanova

Get 10% off your order

UYD-772-MK5

Enter UYD-772-MK5 at the checkout to get 10% off one-time tasks or any maintenance plan.

Get started