How to Add Numbers to Your Comments in WordPress

commentnumI have been receiving a large amount of comments on my Magazine Basic theme and I was having a bit of trouble referencing certain ones, so I decided to add some numbers to the side of each comments to make it easier. It was actually a simple thing to do so here is a quick tutorial. I use the classic theme that comes pre-installed on WordPress for the example.
Open comments.php and find this the lines that look similar to this:

  1. id="comment-">

    @

Now all you need to do is change it to this:

  1. id="comment-">

    @

After that, open up your style.css and add something like this:

.commentnumber {
position: absolute;
right: 5px;
top: 5px;
font-size: 18px;
color: #efefef;
}
.commentlist li {
position: relative;
}

And that should do it.

Share this:

Email
Facebook
Twitter
Pinterest
Pocket

Premium Themes for WordPress

Looking for an easy-to-use Premium Theme for WordPress? Check out Themes by bavotasan.com and have your site up and running in no time.

Use this WordPress website builder to build powerful websites in no time for your or your clients.

WordPress Hosting

WP Engine – designed from the ground-up to support and enhance the workflow of web designers.

Bluehost – providing quality web hosting solutions since 1996.

About the author

Picture of Luke Perrie

Luke Perrie