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.  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.

Update: CommentLuv has now been discontinued.

77 thoughts on “Optimize the CommentLuv wordpress plugin”

  1. Pingback: Tweets that mention Optimize the CommentLuv wordpress plugin -- Topsy.com

  2. 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. 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. 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. Wordpress Tricks

    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 ?

  9. 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.

  10. 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.

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

  12. 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!

  13. 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

  14. 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

  15. 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

  16. 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

  17. 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??

  18. 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?

  19. 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.

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

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

  22. 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.

  23. 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!

  24. 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

  25. 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.

  26. 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.

  27. 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. :)

  28. 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.

  29. 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.

  30. 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?

  31. 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.

  32. 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.

  33. 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


  34. 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.

  35. 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.

    1. The most important point is CommentLuv helps commentators get more back link to their website (homepage link and inner page link), maybe this post can help you: http://www.seotipss.com/seo-benefits-of-using-commentluv-premium-plugin/

  36. 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!

  37. 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.

  38. 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.

  39. 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

  40. hollister pas cher

    ‘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

  41. lunettes de vue ray ban

    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

  42. 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

  43. 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.

  44. 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

  45. spaccio moncler outlet


    ,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,

  46. Right people on board,hollister, while the rest of the car will come hollister chub away.” Villagers loot for carp issue,hollister deutschland, but the crowd hollister deutschland , said:. “Nobody robbed,hollister online shop,http://shimakyu.jp/cgi-def/admin/C-002/keiji/visit/main.pl, that is,http://igohouse.jp/bbs/noti.cgi?res=2% hollister online shop 3

  47. 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. Required fields are marked *

Scroll to Top