Optimize the CommentLuv wordpress plugin

CommentLuv is a wordpress comment plugin powered by Comment Luv. This plugin is compatible with the latest WordPress version up to now, it helps give something back to every single commentator as well as entice them to come back and visit more often by automatically adding a titled link to their last blog post at the end of their comment. In this article, I will show you how to make a bit optimization for CommentLuv.

As you see, Intenseblog.com is now using CommentLuv as website comment, this is a Win-Win comment system that’s not only grow the community, but also the SEO ranking of both the website owner and the commentator:

The plugin fetches the feed found at commenters site URL while they type their comment and extracts the last blog post title with link and displays it below the comment form. When they submit their comment, the last blog post link gets added on the end of their comment for all to see.

The installation process is very simple, you need to download the CommentLuv plugin at:
http://comluv.com/download/commentluv-wordpress/ and follow the plugin instruction. You can read more about CommentLuv at the More resources section of this post, and now I want to show you how to optimize this plugin for your website.

Maybe your websites had already called the Jquery script (or you use another jquery version) but after you install the CommentLuv, the plugin calls for Jquery a second times; Andy Bailey (the admin of CommentLuv) was told that “wp_enqueue_script is already built to do that, it shouldnt show 2x jquery calls unless your theme has it hard coded”, so let check your website before we start to do this:

Besides the Jquery script, the plugin also calls for two other script are: hoverIntent.js and commentluv.js, so that you should:

1. Repair step.

The header data for config commentluv needs to be in the header section of your website and it should be dynamic but if you want to improve the performance a bit more, you should follow this:
View your website source and then copy the following source:
<script type='text/javascript'>
/* <![CDATA[ */
var cl_settings = {
.... // copy all of this source (it's different for a specific website)
usetemplate: ""
/* ]]> */

…then paste it to your footer.php in your theme and add two wordpress conditional tags at the top and bottom:
<?php if (is_single()) { ?>
<script type='text/javascript'>
/* <![CDATA[ */
var cl_settings = {
.... // the source you have copied before
usetemplate: ""
/* ]]> */
<?php } ?>

When you change plugin settings please modified this script so it will not break the plugin use. Please aware what you are doing. (Thanks Andy Bailey for that)

2. Combine the javascript.

First, you should combine the content of hoverIntent.js and commentluv.js into 1 file, ex: combine.js and then add this line to the footer.php of your theme, for example:

<script type="text/javascript" src="http://www.domainexample.com/.../combine.js" ></script>

3. Modify the Plugin.

Second, you need to edit the commentLuv.php (in the plugin folder) by deleting these lines:
wp_enqueue_script ( 'jquery' );
global $wp_version;
// see if hoverintent library is already included (2.7 >)
if (version_compare ( $wp_version, "2.8", " wp_enqueue_script ( 'hoverIntent', '/' . PLUGINDIR . '/' . dirname ( plugin_basename ( __FILE__ ) ) . '/js/hoverIntent.js', array ('jquery' ) );
} else {
wp_enqueue_script ( 'hoverIntent', '/' . WPINC . '/js/hoverIntent.js', array ('jquery' ) );
wp_enqueue_script ( 'commentluv', $this->plugin_url . 'js/commentluv.js', array ('jquery' ) );

4. Combine the CommentLuv Css

Copy the content of cl_style.css (in the plugin folder) to your main style css file and then deleting these lines in commentLuv.php:
add_action ( 'wp_head', array (&$this, 'commentluv_style' ) ); // add style sheet to header
// hook the head function for adding stylesheet
function commentluv_style() {
echo '<link rel="stylesheet" href="' . $this->plugin_url . 'style/cl_style.css" type="text/css" />';

Save and then upload it again to the plugin folder.
In those steps above, you can use some online minify services like http://www.cleancss.com for compress css and don’t forget to read this article: How to: optimize wordpress blog for maximum speed.

And yes, it’s finished, after a few modifications, your website now working more smoothly with CommentLuv plugin, maybe you will happy with this small trick.

Jenni R

I'm a Chief Branding Officer of IntenseBlog Website, a knowledge-hub to help you build a profitable blog. For the last 3 years I have dedicated myself to blogging and online marketing solutions. Connect with me on: Google+, Facebook and Twitter.


Leave a Comment
  1. Pingback:Tweets that mention Optimize the CommentLuv wordpress plugin -- Topsy.com
  2. Reply

    you do know that wp_enqueue_script will only queue a script once right? if you are seeing jquery twice in your header then it means something else has hardcoded the call. Maybe another plugin?

    fyi, the commentluv.js script that is supposed to be included in the head is needed to make commentluv work on this page which it isn’t doing right now :(

    1. Hi Andy Bailey, I’ve try to comment on this page, everything’s going fine :) with this trick but you always need to redo the “Repair step” when you update configuration of the plugin.
      commentluv.js should be included in the head but you can try put it in the bottom of the website, if anything fine let’s use it :).

    2. I’ve updated my article before I saw your comment, I don’t know why Akismet mark your comment as spam :(, thanks for your instruction.

  3. Reply

    Very helpful info, Comment Luv seems to be spreading , but not as quickly as might have been anticipated , guess web masters cant see the advantage

    1. Of course, but when you are using this technique on the big website with various java-scripts, reduce any connection will help a lot.

  4. Reply

    Thank you for linking to my post, ‘Sneaky CommentLuv Trick’.

    You’ve put together a very comprehensive article about CommentLuv, people will certainly find this really useful.

    Warmest regards,


  5. Pingback:200 Fresh Articles for Designers, Developers and Freelancers | tripwire magazine
  6. Pingback:200 Fresh Articles for Designers, Developers and Freelancers | tripwire magazine
  7. Pingback:Optimize the CommentLuv wordpress plugin | WordPressPlanet.com
  8. Reply

    Yeah, optimize comment luv plugin is very great for our blog

    nice overview :)

  9. Reply

    I very like your website.This post was a time saver! Thanks.

  10. Reply

    Hi, i;m have same interesting with you and i found your website from google. You give nice info for wordpress plugin and it’s really informatif. Can i copy your post into my blog ?

    1. Of course if you place a source link to my article :)

  11. Reply

    This seems like a nice trick but major problem with this process is that it will require manual intervention with each update.

    I personally prefer to use WP-Super-Cache + Autoptimizer plugins. First creates static pages for quick page load and second combines CSS and javascript for you. Not perfect setup but my tests have proven it speeds up the site a LOT!

    …and no need to worry about code changes when plugin is updated.

  12. Reply

    Thanks for sharing this information on optimizing the wordpress CommentLuv Plugin. This plugin is great for getting content on the site and providing a quality backlink for those that leave a comment.

    1. Of course, you can do with that WordPress version, good luck.

  13. Reply

    Very interesting and I agree that commentluv give win win solutionfor owner blog and visitor, but can I use this in blogsot?, thanks :)

    1. I don’t think there is a commentluv plugin available for Google blogspot :)

  14. Reply

    Hi Jennifer,
    Great tip on speeding up the CommentLuv plugin. It is very easy to weigh a blog down with excess scripts and kill the site speed. A little boost to the speed here and there will start to add up. Thanks for the helpful information!

  15. Reply

    Excellent article. I have been using commentluv plugin, but i guess i will have to try this tips you have provided on my blog as well to see if there is significant improvement.

    warm regards

  16. Reply

    I agree that this is a nice little tip but again, the upgrading process will most likely break it again. I guess we just have to keep track of all what files we edit.

    Nice Post

  17. Reply

    Thanks you for your tutorial about Commentluv.

  18. Reply

    Thank you for providing this awesome post on commentluv. This plugin is very useful for newbies like me.

  19. Reply

    Commentluv only gave me headaches, I got so many error while implementing it :(

  20. Reply

    Ive never heard of this plugin but it looks like it could be useful. Ill try it on 1 of my sites and see how it goes, thanks

  21. Reply

    I am a huge CommentLuv fan myself! It really encourages people to comment on your blog.

  22. Reply

    i wanna try commentluv but im use blogspot. someone knows how to import all post from blogspot?

  23. Reply

    Thanks for the nice blog. It was very useful for me, exactly what I was looking for, and I am glad to came here!

  24. Reply

    Very helpful info, Comment Luv seems to be spreading , but not as quickly as might have been anticipated , guess web masters cant see the advantage

  25. Reply

    Hey Jennifer , this is a nice optimization tip :)
    I’m using Livefyre Comment system in my WordPress blog and would like to know from you whether it can be integrated with Commentluv??

  26. Reply

    Hmm didn’t know that there was a 2nd call for the JS gotta check that, thanks for sharing.

  27. Reply

    I thought comment luv allowed you to get a dofollow backlink? Is this not the case or did you do something to the plugin to make in no follow?

  28. Reply

    Nice article guys, but as i have come to your blog through Google, in search of some Firefox plug-in which automatically search for high PR comment Luv blog pages. But as I started reading your article, it becomes more interesting. Thanks for sharing.

  29. Reply

    I find commentluv the best web design for bloggers. Thank you for sharing us this wonderful post. Great facts you’ve presented here!

  30. Reply

    Good tips, I have been using CommentLuv but will try some of this out to optimise it now. Thanks a lot!

  31. Reply

    Comment Luv provides a great opportunity for the commentor. This article is a sure way to optimize the plugin. Thanks for this! :)

  32. Reply

    Easy to follow and might just help my blop once I get the plugin installed. I have been toying with the idea of using commentluv for a while but after a few days of research it looks like a great addition.

  33. Reply

    These instructions are very useful. I had a conflict problem with jQuery but it is solved now. Thank you!

  34. Reply

    Personally, I prefer to use WP-Super Cache plugin + Autoptimizer. First, create static pages for faster loading of pages and the second combines CSS and JavaScript for you. It is the ideal setup, but my tests showed that speeds up the place a lot!

  35. Reply

    This is great guide I’m very new to Commentluv and this post has shown me a thing or two that I have not yet seen. I just need to figure out how to configure my rss feed to take advantage of it all. Thanks, Chris

  36. Reply

    Hello. I wanted to give you a note to verbalize my thankfulness. I have been watching your blog posts for a month and have got a ton of excellent tips and appreciated the way you have built your web site. I’m going to make my blog however I feel it is too general and I need to concentrate more on particular issues.

  37. Reply

    I enjoy your site – I would like to talk with you about buying ad space here granted you do that. Hit me up at the email I provided and we can talk about, thanks mate.

  38. Reply

    This is actually a trick. It would be an awesome use for a big blog, especially for people who really love to blog a lot of what they’re doing.

    @Jennifer R Thank you for sharing. I’m using it for my other WordPress blog. :)

  39. Reply

    Pretty good post. I just came across your site and wanted to say that I have really enjoyed reading your blog posts. Any way I’ll be coming back and I hope you post again soon.

  40. Reply

    This comment really help us to improve our site and also good for the bloggers. I like this plugin and also keyworluv.

  41. Reply

    Comment Luv is really a great plugin, thanks for sharing this info.

  42. Reply

    I hade no idea it could be optimized. It’s already a good plugin =)

  43. Reply

    I have CommentLuv on a lot of my websites and have since Andy came up with the idea. It was around the time that comment exchange communities were thriving. The problem with those communities were that people were only commenting on the sites they were assigned. It became a chore for some and a pain to others when some bloggers did not update as much. The system was quite random.

  44. Reply

    comment luv reaally great and can be easily used with wp cms. thanks

  45. Reply

    Excellent guide! I had no idea you could even optimize commentluv.

  46. Reply

    Hey guys I have been using CommentLuv for a long time and know know what can be done with that Tool. You can leave a comment with this tool and also trackback with better look. But I wanna know more how can I modify the avator of those comment post. Can you please suggest me?

    1. Did you mean Avatar? If it’s, you can’t change that! It belongs to your commentator.

  47. Reply

    Hey it is very useful plugin…I am using most of the plugin while designing a WordPress website..i’ll this one also..Thanks for sharing.

  48. Reply

    Thanks for such useful information.I have enabled commentluv on my blog 2 days before and started getting comments on my blog within a day only.

  49. Reply

    Thanks for such useful information.I have enabled commentluv on my blog 2 days before and started getting comments on my blog within a day only.
    Mr.Bhavesh last post: Keep watch on your site backlinks with Backlinkwatch


  50. Reply

    Comments Love plugin for ther bloggers is so nice thing to have, because it provides traffic when you leave a comment on someone’s blog, but it also adds to the use of SEO, i will try this plugin soon. thanks for sharing the useful information about comment love plugin.

  51. Reply

    I still think that commentluv is not good for seo ,yes it will encourage user to post comment but how that will help those blogs who are using those plugins.

  52. Reply

    Thanks for info about CommentLuv for worpress!

  53. Reply

    CommentluVu is now creating its own name on the internet and wordpress. I have tried this plugin and it made huge difference on my biz. Thank you so much for putting up this post. Thanks!

  54. Reply

    Indeed,comment Luv is wide spreading recently but I don’t have any idea in optimizing it till I read your post currently. Great, I saw your post this helps me a lot.

  55. Reply

    Never used commentluv before other than commenting to other blogs, is that so powerful to be added in my blog?

  56. Reply

    Nice tips.I was planning to use CommentLuv in my blog and i think this codes will help me a lot to optimize my commentLuv WordPress plugin.Thanks for your tips.

  57. Reply

    Ive heard of this plugin but never use, but now it looks like it could be useful. Ill try it on my sites and see how it goes, thanks

  58. Reply

    I was about to write an article about CommentLuv. I am sharing this on my blog, thanks :)

  59. Reply

    ‘s many enthusiastic owners of online shopp hollister france ing is also complaining that the residential property this practice, de hogan outlet priving them of their rights and interests to enjoy the courier service. In this regard, Hanjing Daru family Jindi Property Co. property management department, said they did scarpe on line not take suc

  60. Reply

    covering up all the way to fo botte ugg pas cher llow ,botte ugg pas cher. Baiyun stop the wind stoppe 2014 ugg magasin site officiel d Wang Li and embarrassed to refuse,2014 ugg magasin site officiel. met Xiao Feng This child is really your good fortune,la presse tn! s la presse tn he said to the North Tian to break off the corn,ugg bailey button.
    this Sunday

  61. Reply

    Some candles burning on the grass to stay plugged in,abercr abercrombie uk ombie abercrombie and fitch uk uk, and the family was here to pray for the dead rest in peace.

    Two women Zhuangfei straight Leng Leng, died on the spot while the car was finally “block” in the center of the front lawn trees,abercrom abercrombie bie and fitch uk, front an

  62. Reply

    has shown t magasin en ligne hollister he terror of keynes’s magasin en ligne hollister hollister outlet online monetary analysis

    But we took the room because we didn’t want to hollister outlet online be in the room we hated and knew we wouldn’t ge hogan bambino t any refund based on hogan bambino discussion other guests were having with the middleman in public.

  63. Reply

    love the mo moncler prezzi therland of the aviation moncler industry, died in the line of duty,moncler prezzi, and your smile shake shake, not because of sadness and customs million. and I just fig burberry pas cher soldes ure. but not without!
    to carry out the learning activities to Comrade Luo Yang as an important task, Luo Yang,moncler, we h

  64. Reply


    ,hollister deutschland
    hollister deutschland to promote Small and micro businesses an hollister berlin d industrial business running smoothly,hollister berlin, the province’s agricultural letter society through the formation of associations of loans,cheap nfl jersey, bank acceptance bill discount and so on cheap nfl jersey ,abercrombie uk sale,

  65. Reply

    I’ve just learned about this plug in and it seems to have tremendous value…. My only concerns are that all comments have people’s names crossed out, as well as their recent blog titles, if they have a blog of their own.

    You wouldn’t be able to shed some light on this subject Jenni ?

Leave a Comment

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Send a Message