May 27, 2010

I’ve noticed a plugin doing the rounds of the Wordpress blogs recently called Highlight Author Comments. It helps to achieve an effect previously only possible by altering your theme: different styling for the author’s comments. I’ve decided to compare it to the theme alteration and look at when each is most appropriate.

Using the plugin is very simple. Once installed it provides an option page where styles can be entered and saved. It will take any number of CSS styles in inline format.

author comment options selection
Adding styles to the plugin

The plugin works by wrapping the comment content in a div tag with those inline styles applied so there is quite a lot of flexibility as to the styling options including background colours, images, borders, type changes, and position changes.

Theme Alterations

The plugin and the theme alterations work on exactly the same principle: for each comment check whether the e-mail address entered is that of the posts author, and if so applied a different set of styles of code. At it’s most basic:

if ($comment->comment_author_email == get_the_author_email()) {
echo ‘<h3>Author Comment</h3>’;
} else {
echo ‘<h3>’.$comment->comment_author.’ says:</h3>’;
}

When to use

If you are using a ready made theme then the plugin is ideal. It helps you make the comments stand out very easily. It would also seem to be best if the style changes need only be quite minor, and don’t require any other parts of the template to change. Adding a subtle gradient to the background and changing the colour of the text would be easy.

If you have a more ambitius nature and want to change the template around the comment, such as the header or the way the date is shown, then changing the theme is likely to be more appropriate.

More details about the plugin can be found at All things seen and unseen.



Wordpress feature image page?
24 comments on page 1065

Addsettingsfield?
3 comments on page 793

Shorter link?
4 comments on page 1190

Shorter link?
4 comments on page 1190

Cssimageforlogin?
no comment on page 128

Cssimageforlogin?
no comment on page 128

Get featured image url wordpress?
24 comments on page 1065

How to clear wpcache?
9 comments on page 1310

Photo gallry code html5?
6 comments on page 1305

Wordpress get image size?
24 comments on page 1065

Sitecouk wptheme?
2 comments on page 1376

Wordpress chat disqus?
no comment on page 1308

Howtocreategoodsizelayout?
4 comments on page 1026

Friend connect profile?
6 comments on page 1364

Get medium image from post?
24 comments on page 1065

Tabbed widgets wp?
no comment on page 333

Wordpress plugin post separator?
no comment on page 1371

Wordpress pictue cache lschen?
9 comments on page 1310

Display photos html 5?
6 comments on page 1305

Fun wordpress themes?
2 comments on page 1376

Wp featured image without size?
24 comments on page 1065

Wordpress get url global?
4 comments on page 1190

Wp unlimited?
3 comments on page 1141

Html5 image gallery?
6 comments on page 1305

Wordpress exif plugin?
12 comments on page 230

Css login screen?
no comment on page 128

Htlm 5 photo gallery?
6 comments on page 1305

Css login screen?
no comment on page 128

Comments by intensedebate?
7 comments on page 1175

Image gallery html 5?
6 comments on page 1305

Wordpress andrew rickmann?
2 comments on page 1376

Wordpress medium large?
24 comments on page 1065

Fun with uninstallation wordpress?
53 comments on page 100

How to clear wp cache?
9 comments on page 1310

Photoshop frameworks?
3 comments on page 296

Html5 gallery?
6 comments on page 1305

Html 5 photo gallery?
6 comments on page 1305

Login screen css template?
no comment on page 128

Html5 photo gallery code?
6 comments on page 1305

Wordpress post multiple images?
24 comments on page 1065
  every 1984s, 1s ago, in 0.02s.
Post a comment?

0s