WP Plugin: Official Comments

I just whipped up a quick WordPress 1.2/1.5/2.0 plugin that allows you to distinguish comments made by WordPress users. It also will automatically approve comments made by WP users.

Current Version: 1.1

How It Works:
If you are logged into your WordPress admin panel, and you make a comment, the plugin will see that you are an official WP user of your blog and mark the comment with your WP User ID.
When the page is rendered, that User ID is called up by the plugin functions, which you can use to change text, change CSS class, add images, whatever your imagination desires.


How to implement:
Simply add this somewhere within the Comments loop in wp-comments.php and/or wp-comments-popup.php:

<?php if(is_wpuser_comment() != 0) {echo "Official ";} ?>

Or get tricky and add a CSS Class to the LI:

<li class="comment <?php echo (is_wpuser_comment() ? ' commentOfficialUser' : ''); ?>" id="comment-<?php comment_ID() ?>">

and this very basic css example:

.commentOfficialUser { border: 1px solid black; background-color: #999999 }

View Official Comments Readme.txt

There is a very basic example on this post, but more exciting examples available at Webfroot.

Known Issues
It only works with official comments made after the point of installation, as WordPress doesn’t automatically add the WP user ids to the comments field it already has.

Bugs and Suggestions
Any bugs or suggestions, please email me — email link in the sidebar (RSS readers: drop by the site 😉 ).

159 thoughts on “WP Plugin: Official Comments

  1. […] Um das Wiederkennungsgefühl von Autorenkommentaren zu stärken, haben wir heute das “Official Comments” -Plugin installiert. Nach einer kleinen Anpassung der Hintergrundgrafik und einem großen Haufen Flüche (”Ich kann nun mal kein CSS”) werden Kommentare mit Hilfe eines selbsterstellten Hintergrund gesondert darstellt. Tags: Misc […]

  2. bssn

    reading now

  3. this is hawt. ima use it!!

  4. hm


  5. I just want to say thanks for this plugin, it’s working ok in my blog site, thank you man.

  6. […] For those of us who remember the original comment-spoofing-identity-crisis that started the whole problem, you can thank Indi for hitting me over the head with a simple fix: the Official Comments plugin. All of you who have already registered for accounts on Moju now get a spiffy light-purple box and a notice that says “Registered Commenter” whenever you comment. Un-registered commenters using the names of registered commenters may be considered devious and possibly untrustworthy human beings, and the rest of us can ignore them, or whatever. See the comments on this post for examples of registered and non-registered comments. And of course, everyone who’s registered for commenting can also write for Moju. […]

  7. […] Rounded blue editon now support the Brett Taylor’s official comments plugin. From the author : “If you are logged into your WordPress admin panel, and you make a comment, the plugin will see that you are an official WP user of your blog and mark the comment with your WP User ID.” Filed under : Rounded V2 blue editionBy Ghyslain On August 15, 2006 At 9:59 pm Comments :   […]

  8. salut


  9. Brett there’s a way to make apply to admin and users?

    If is admin, echo .commentAdmin
    or if is a member, echo .commentMember

    I’m not good on PHP if you could help me.. thanks alottt

  10. Hi Chris,

    No, not easily. It would involve another set of functions:

    If official user, then find out what their user level is.
    … If admin, echo .commentAdmin
    … else echo .commentMember
    else echo .commentAnonymous

    I could probably add this into the plugin pretty easily, really.

  11. Brett

    Could you make this code, please? I would take some years to make it.
    But i will learn PHP and make a plugin nice like yours someday. ^_^

    and thanks for answering me so quickly.

  12. […] After installing Official Comment to this blog, I found a way to make the Official Comment to have an alternating effect much like the default comment list. It is simple and it occur when you place the tag next to the alternating tag. For example, this is what I’m using. […]

  13. […] Functionally, the site runs on the open source wordpress blogging cms. In addition, I’ve also added the official comments plugin and the random quotes plugin. The wordpress implementation is fairly straightforward, two exceptions being custom page templates for each section and some header tweaking to produce the navigation visual elements. […]

  14. Hi Brett,

    I would really like to apply the different style only for users with a level above Subscriber (the smallest possible registered user). If the user is just registered, I wouldn’t want their comments to be applied as official comments.

    Can you help me do that, please?

    Thanks a lot for the great plugin.

  15. koz

    Hello. As you may see on my blog, I have quite well implemented your plugin except that I have that point (I don’t know the word in english : the point due to “li”) at the beginning of each comment… I trie to implement your plugin with ul or ol instead of li, but the result is not satisfying.

    Do you have any idea for me ? Or is it only a theme issue ?

    And… Thank you for your work.

  16. […] If you are using the Official Comments plugin with a recent WordPress version, you might be getting Database errors when you post a comment on your own blog. To fix these, open the official-comments.php file and change: […]

  17. Phillip

    Hello there!

    I was wondering how I can change this:

    Under every of my comments it says “Official!”. Can I delete this somehow?


  18. […] Official Comments – Hinterlegt einen Kommentar vom Blog Autor in einer anderen Farbe. […]

  19. Does anyone know the name of the wordpress plugin that creates a list of your posts in a category instead of just displaying them one after the other? I want it so that when someone clicks on a category they just get a list of posts from that category.

    I'm sure Ive seen one…and sifting through the WP site is a nightmare

  20. I have used your plugin, thanks its great Brett (:

  21. carino il blog


  22. yes i’m using it too great thing! thanks!

  23. mariya


  24. A great plugin! I got the plugin working but it’s not displaying my edited CSS! This is what I put in my comments.php file:

    echo " ";

    And this is what is in my CSS file:

    .commentOfficialUser {
    border: 1px solid black;
    background-color: #999999;
    padding-right: 3px;

    Any thoughts?

  25. That didn’t work! Here it is again:

    A great plugin! I got the plugin working but it’s not displaying my edited CSS! This is what I put in my comments.php file:

    if(is_wpuser_comment() != 0) {
    echo ” “;

    And this is what is in my CSS file:

    .commentOfficialUser {
    border: 1px solid black;
    background-color: #999999;
    padding-right: 3px;

    Any thoughts?

  26. Um. 0.8 with NOTHING in front of it? No 1, no 2? Well…. head over here: http://static.wordpress.org/archive/ and download versions 1.2, 1.5, 2.0, and the current 2.0.5 – and then upgrade first to 1.2, make sure it’s working right; then to 1.5, make sure it’s working right (your template won’t – the whole setup changed at 1.5 to a themed setup, with a completely different schema – just change to the default or classic at that point); then to 2.0, then to 2.0.5.

    And good luck by Labus

  27. Keep up the good work. Greetings

  28. Hey it looks like a really good plugin, but sorry the download link is broken. :S Just so you know.

  29. #1 Alternative to AdSenseTM!


    #1 Alternative To Affiliate Marketing!

    Add The Highest Paying Pay-Per-Lead Ads Targeting
    Your Niche To Your Website and blog… In Minutes!

    Big companies are already paying people like you large sums of CA$H for sending them visitors to get free stuff!

    Checks, Checks and More Checks Stuffed In Your Mailbox!

    Imagine yourself OPENING YOUR MAILBOX every single month and finding it stuffed with envelopes full of $500… $1000… Even $5000 Checks!

    Introducing Pay-Per-Lead Power Ads Software Systemâ„¢!

    Pay-Per-Lead Power Ads Systemâ„¢ is the Quickest and Easiest Solution for: (1) Finding the highest paying Pay-Per-Lead products, (2) Creating, (3) Managing and (4) Maximizing your revenues from Pay-Per-Lead Ads!

    Three Powerful Software Solutions In One:

    #1 Pay-Per-Lead Research Center:
    Search for and find the highest paying Pay-Per-Lead niche products and offers, quickly and easily!
    #2 Pay-Per-Lead Ad-Units Creator:
    Create Google-like Ad Units (like AdSense ads) for Pay-Per-Lead niche products and offers.
    #3 Pay-Per-Lead Keyword Ads Generator:
    Create contextually relevant keyword ads for your Pay-Per-Lead niche offers, like THIS.

    Click Here To Sign Up Now!


    No software to download, upload, install, update.

    Manage everything from an easy browser interface. Complete, 24/7 control over your own account, via an online control panel.

    Add The Highest Paying Niche Pay-Per-Lead Ads To Your Website(s) and blog(s)… In Minutes!

    Click here to get started with Pay-Per-Lead Power Ads Systemâ„¢ 100% Risk Free!

    This letter is going to show you how you could do that, and maximize your website’s money-making power, quickly and easily… Guaranteed!

    You’ll learn:

    1. What is Pay-Per-Lead, and why it is so profitable!
    2. In What Ways Is Pay-Per-Lead Better Than Pay Per Click & Pay Per Sale (Affiliate Sales)?
    3. AdSense Is Alive/Dead – The one thing you can learn from this raging debate.
    4. Start Generating Pay-Per-Lead Profits Today! We’ll show you how to find the highest paying Pay-Per-Lead products quickly and easily, then how to generate Pay-Per-Lead ads and add them to your website/blog in minutes.

    You could start cashing in on Pay-Per-Lead marketing and generating Pay-Per-Lead profits in the next few hours!


  30. http://www.secundus.org/online/ppllead.html – Хрень какая-то!

  31. Someone else below asked this already.
    I am getting nailed with Spam in my website for our blog website. Is there anyway to stop this? If not, there really isn’t any point in leaving it up and active. Any help will be greatly appreciated. http://www.profesjonalna-reklama.pl

    Thanks Keep up the good work. Greetings from Poland

  32. I always have terrible trouble with comment-related plugins that require me to put some line in the comment loop; I can never seem to find the right spot. Can anyone tell me where I should put the php line in my comments loop? I haven’t modified anything much, and I’d be very grateful. Thanks!

  33. Just wondering if there was a way to specify a generic image for non-registered users/commenters?

  34. nice site:thank you for all

  35. What I want to do on my blog, is every few hours take the oldest post and move it to the
    front of the queue, all automatically. Anyone know if there is a plugin that can do this or
    a simple way to set up another plugin to do this (use my own feed perhaps)?

  36. yes i agree with you great site

  37. Any help will be greatly appreciated.

  38. I saw several people make a feature request of ensuring the user’s level is above subscriber before applying the official code to the comment. However, I don’t see those changes in the code nor do I see the proper code posted here. Did you ever get around to that, Brett?

  39. […] Official Comments: Permite distinguir los comentarios escritos por usuarios registrados en la bitácora. Además, los comentarios de estos usuarios serán aprovados automaticamente. […]

  40. Personally, I think, that the presented command:”” id=”comment-&lt?php comment_ID() ?>”>” should be modified as follows: ” id=”comment-&lt?php comment_ID() ?>>>”>. I have personally tested this modification and am surprised by its stunning effectiveness.

  41. Very good plugin and very good site.

  42. […] I decided that on my main site that I wanted the comments I made to appear different than the others (after all, why not inflate that ego?). I wrote a tutorial on integrating the Official Comments plugin with the Glued Ideas theme. […]

  43. You have very good article, I see
    pink im not dead

  44. This is my favourite plugin

  45. Hey, this is looks great 🙂

Comments are closed.