SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Wizard silver trophy Bleys's Avatar
    Join Date
    Feb 2003
    Location
    RI-USA
    Posts
    5,620
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Highlight author's comments in Wordpress

    Can anyone suggest a plugin (or easy way) to apply special css to comments by the author?

    Is this the only plugin to do that or are there other options: http://inner.geek.nz/archives/2005/0...cial-comments/

    (also, not sure if that will work with newer versions of wordpress, since it appears to be a couple of years old)

    Does anyone know of one that plays nicely with more than one author?
    Josh is an anomaly
    rails & work & twitter

    Organization is the
    death of creativity.

  2. #2
    Follow Me On Twitter: @djg gold trophysilver trophybronze trophy Dan Grossman's Avatar
    Join Date
    Aug 2000
    Location
    Philadephia, PA
    Posts
    20,580
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    You could add a few conditionals to the comments.php template based on $comment->user_id. Not as clean as a plugin, but if you just want to highlight posts by a few users (the authors), only one or two lines you can easily change in the future.

    PHP Code:
    //set $style to highlighted if the post author equals the comment author
    if ($comment->user_id == $post->post_author$style 'highlighted'; else $style 'normal'

  3. #3
    Bananas contain Zinc fonzerelli_79's Avatar
    Join Date
    Oct 2001
    Location
    Scotland
    Posts
    816
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    this is exactly what you are looking for
    enjoy

  4. #4
    Is Still Alive silver trophybronze trophy RetroNetro's Avatar
    Join Date
    Jul 2003
    Location
    Texas
    Posts
    6,883
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Or this one will work also

  5. #5
    SitePoint Wizard silver trophy Bleys's Avatar
    Join Date
    Feb 2003
    Location
    RI-USA
    Posts
    5,620
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Options abound. Thanks guys.
    Josh is an anomaly
    rails & work & twitter

    Organization is the
    death of creativity.

  6. #6
    SitePoint Guru Lars-Christian's Avatar
    Join Date
    Dec 2004
    Location
    Tromsų, Norway
    Posts
    713
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Alternatively, this will also give you a guide on how to do it

  7. #7
    SitePoint Wizard silver trophy Bleys's Avatar
    Join Date
    Feb 2003
    Location
    RI-USA
    Posts
    5,620
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    Thanks Lars! I think even a technical dummy like me can follow along with that one.
    Josh is an anomaly
    rails & work & twitter

    Organization is the
    death of creativity.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •