Customize the Blog Author Comments

If you want to customize your own blog and leave a comment? This feature in the comments section to add a personal touch, and the readers of your comments may help to identify and to follow the conversation. You will find a step by step guide to do this at the bottom:
Locate the class attribute of the comments stylesheet

The first thing you have to do is ruling your comment text field in your stylesheet (usually style.css) is detected on the class attribute. What are you looking for something like this:

.commenttext {
clear: both;
padding: 20px 10px 20px 10px;
width: 400px;
background-color: #FFFFFF;
}

Blog writers to create a second class

General comment (your class may have a different name attritube “commenttext” is just one example of the notice) will use that class. Now you have a second class, customize it, the author comments on the blog, one that will be used by the need to create. If you just want to change the background color, for example, the class will look like this:

.commenttext-author {
clear: both;
padding: 20px 10px 20px 10px;
width: 400px;
background-color: #F7F7F7;
}

You can also use a background image can add a badge to your comment.
Comments loop detection

There are two classes of your stylesheet you once you turn on the loop begins with the line, where comments.php open the file and will be able to identify:

Inside the loop you will need to find the code that is calling the class that styles the comments:

PHP insert a conditional clause

As you can see from the above code the comment function for every comment “commenttext” class is called. We remove the first line and then found a certain parameter (this parameter is 1 or 2, depending on which version of your WordPress author’s user ID, to be) “commenttext- author” would call the class to insert a conditional clause and parameters normal “commenttext” if it is not class:

user_id) == 1) { $class =
‘commenttext-author’; } ?>

(Visited 6 times, 1 visits today)

1 Comment

  1. Hi my name is Sandra and I just wanted to drop you a quick note here instead of calling you. I came to your Customize the Blog Author Comments | Tutorial and Blog page and noticed you could have a lot more hits. I have found that the key to running a popular website is making sure the visitors you are getting are interested in your subject matter. There is a company that you can get targeted traffic from and they let you try the service for free for 7 days. I managed to get over 300 targeted visitors to day to my site. Check it out here: http://www.arvut.org/1/dft

Comments are closed.