Well, there are many different ways to display comments on your blog/website and one can adjust it quite easily depending on the theme, plugin or widget you are using. BUT there are sometimes limits to what the styling will look like as well as the information being displayed.
Please make a backup of your function.php and custom.css file. Also double check quotes when doing a copy paste.
Yes, I know there are many WordPress plugins available to download and the format comments, but you are sometimes limited to what the plugin developer chose. I also used the default widget that comes with WordPress, but the output that was displayed on my blog was just not that appealing and I wanted more. You can say I was greedy in a funny way, lol.
I then did a search on Google and came across a few sites explaining how one could display comments without using a plugin or the default widget.
This would mean I could change the way it showed the comments and of course do my own CSS styling. I thought this was really great and I have been using it on this blog for sometime now with no problems at all.
I would like to take this opportunity to share this knowledge that I came across with all my loyal followers and visitors. I know some might have already seen it, but this might still give you ideas of what is possible and you might even make a few tweaks to yours. You could also few some of my other tutorials that I have made available for download.
The download file contains two functions as well as the CSS styling and I have done my best to put in a format that one can understand easily. One can always play around with function to display other details or CSS styling to give your comments a different look.
CSS styling has settings like:
- background colours
- font colours
- floating of gravators
- gravatar hover
- gravatar height and width
- etc
As you can see from the above list, you could display a lot of information if you want to. I would suggest displaying a bit of information, but do not overcrowd the space you are using otherwise you might confuse the users.
Please note that I have written this for the widget area on your theme. You could customize it if you want. All you need to do is call custom_recent_comments function.
Thesis Tutorial - Display Recent Comments without a WordPress plugin
The download was made available on 28 May 2010 and is in zip format. The file size is 1.31 KB and has currently been downloaded 56 times.
Final Thought
So, do you use a plugin or widget to display recent comments? If you do, would you change to minimize the number of WP plugins used on your blog/website? Did you find the tutorial easy to follow?




















{ 7 comments… read them below or add one }
Nice work done by you George I am not even using default widget to show recent comments, I deleted it due to hardly readers ever may notice it and may helps my website load speed.Will use file you mentioned in future .
venkat´s last blog ..VLC Media Player 1.1.0 Final Released [download now]
Nice tip George, long time no see any thesis tip
Manually adding recent comments can give us a broader way to customize it. Thanks for sharing !
Gagan´s last blog ..6 Tips On How To Optimize Your Blog For Upcoming Festivals
Hey Serradinho, didn’t see you posting for few days, you should be busying for your project right? Mind to update us how’s your project going?
I always like your thesis customization tips! Keep posting!
Regards,
Lee
Lee Ka Hoong´s last blog ..Branding Your Blog With Brandable Logo Design
Hi George,
I have the custom_functions.php setup as well as the custom styles, how do I insert the code (and what code do I insert) in the sidebox to call the function to display the ads? Is it into a text widget or directly into the sidebox.php
Thanks,
Michael
@Michael Brown – well, if you want to insert it into the sidebar using a widget then you need a plugin that reads in PHP code in widgets
OR
You can insert it directly just by calling the function itself and pass it the parameters.
<?php custom_recent_comments(6,90); ?>BTW, I have actually taken the recent posts functions and created a widget whereby one can drop and drag the widget and then do your selection on the options available. I have not yet done it with the recent comments, but it is on the table.
sorry, was trying to call the ad rotator function, couldn’t find the code snippet on that page..