HomeDesign / DevHighlight Author Comments in Wordpress

    Highlight Author Comments in WordPress

    While we were busy linking to a site’s post, responding and leaving comments, we might wonder amongst all those comments, which are the authors comments and which are visitors comments. It should be easy to differentiate the two sides. If you have a wordpress website, this can be done easily using simple wordpress hacks.

    1. Simply locate a file named comments.php in your theme file (we assume you already know what files are inside your theme. You will need a html/php editor like Notepad++ or dreamweaver to edit the file). Double click the file comments.php to open it.
      Inside you will find arrays of codes. Immediately find a line of codes that look like this:
      [sourcecode language=’html’]

    2. ” id=”comment… [/sourcecode]
    3. And just modify it to this:
      [sourcecode language=’html’]

    4. user_id)
      $oddcomment = “authcomment”;
      echo $oddcomment;
      ?>” id=”comment… [/sourcecode]
    5. Then to change your theme to add an “authcomment” style, locate the theme stylesheet (style.css) and click to open it using the editor.
      At any line, add these code:
      [sourcecode language=’css’].authcomment {
      background-color: #B3FFCC !important;
      } [/sourcecode]

    Click save to both file comments.php and style.css. Go and try to look at your comments page. See if the color suits your wordpress site. That’s it!

    - Advertisement -
    Owner of WPTidBits. Totally in love with WordPress!


    Please enter your comment!
    Please enter your name here