More
    HomeDesign / DevAdding Numbers to Wordpress Comments

    Adding Numbers to WordPress Comments

    It might be useful if we can add numbering to a wordpress comment so that we may be able to count of how many comments we obtained. Not to only us but also to the visitors who left their comments. Here is how we can add numbers to wordpress comments.

    You may need to tweak your theme to enable this feature. We assume that you already know what files are inside your theme. You will need an html/php editor like dreamweaver or notepad++ for editing.

    1. First thing you need to do is locate the comments.php file and open it with the editor.
    2. Then you will see arrays of php codes. Locate the code that starts the comment loop. It will look like below:
      [sourcecode language=’php’][/sourcecode]
    3. Then place the following code above the code in step 2.
      [sourcecode language=’php’][/sourcecode]
    4. After that locate the code that looks like this:
      [sourcecode language=’php’][/sourcecode]
    5. Place the following code below the code in step 4.
      [sourcecode language=’php’][/sourcecode]
    6. Finally, place this code where you want it to display the comment numbers, and click Save:
      [sourcecode language=’html’]

      [/sourcecode]
    7. For customization, locate stylesheet (style.css) and place this code:
      [sourcecode language=’css’].count {
      float:right;
      padding: 10px;
      font-size:18px;
      color:#000000;
      }[/sourcecode]

    Anything left? Adjust the stylesheet property for better appearance and suitable placement according to your need if you want more. That’s it!

    - Advertisement -
    WPTidBits
    WPTidBitshttps://wptidbits.com/
    Owner of WPTidBits. Totally in love with WordPress!

    LEAVE A REPLY

    Please enter your comment!
    Please enter your name here

    110FansLike
    761FollowersFollow