You are currently browsing the page Styling admin comment in the Wordpress category.

Styling admin comment

Here is Wordpress default comment template:

<li <?php echo $oddcomment; ?> id="comment-<?php comment_ID() ?>">
<cite><?php comment_author_link() ?></cite> Says:
<?php if ($comment->comment_approved == '0') : ?>
<em>Your comment is awaiting moderation.</em>
<?php endif; ?><br />
<small class="commentmetadata"><a href="#comment-<?php comment_ID() ?>" title=""><?php comment_date('F jS, Y') ?> at <?php comment_time() ?></a> <?php edit_comment_link('edit',' ',''); ?></small>
<?php comment_text() ?>
</li>

In the first line, just look for <?php echo $oddcomment; ?> and replace it with:

<? if($comment->comment_author == "Your nickname") echo ' class="admin"'; else echo $oddcomment; ?>

Then, in your stylesheet, add a different style for .admin ! :)

Print This Post Print This Post



Sponsors


One Response to “Styling admin comment”

layout forevermore viagra
every so suffocating in a few words


Leave a Comment

Works? Doesn't work? Other tips? Please leave a comment! :)

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>

To post codes, please go to SimpleCode and transform your codes first, so that it will displayed properly. Indeed, < and > need to be converted to &lt; and &gt; :)


Close
E-mail It