KeywordLuv – Theme Compatibility Issue

This page explains the compatibility issue that the KeywordLuv plugin has with some WordPress themes and the options to get around it.

The Problem

KeywordLuv works by filtering the following functions:

  • comment_author_link() OR get_comment_author_link()

If your theme uses one of these functions to display the comment author link, KeywordLuv will work. However, it will not work if your theme manually builds the comment author link, using the following functions:

  • comment_author() OR get_comment_author() AND
  • comment_author_url() OR get_comment_author_url()

From what I can tell, most themes will use the first method. However, there are themes that use the second method.

How Do I Find Out If My Theme Is Compatible?

To find out if your theme is compatible, you can either:

a) Try the plugin: Activate it, leave a comment using the Name@Keywords notation (in the Name field). If the Name part appears before the link, your theme is compatible. If it appears exactly as you typed it, it’s not compatible.

OR

b) Check your theme: Look in the comments.php file for your theme and search for comment_author_link() or get_comment_author_link(). If you can’t find one of these, then it is likely that your theme is not compatible.

Note: If you use Brian’s Threaded Comments or YATCP for threaded comments, KeywordLuv will work, as it does not use your theme’s comments.php file.

What If I Really Want To Use KeyWordLuv?

If your theme is not compatible, there are several options open to you:

1. Use KeywordLuv’s Compatibility Mode

From KeywordLuv 1.02, you can run the plugin in Compatibility Mode. Here’s how you set it up:

  1. Go to the KeywordLuv Options screen in the WordPress Admin area, select the Compatibility Mode setting and Save Changes.
  2. Use FTP to go to the wp-content/themes/[yourtheme] folder on your server and download the comments.php file.
  3. IMPORTANT: Make a copy of the comments.php file so you can put it back if something goes wrong.
  4. Edit the comments.php file and find the line that adds the comment author’s name. It normally looks something like this:

    <a href="<?php comment_author_url();?>"><?php comment_author();?> </a>

  5. Add the following immediately before it, leaving the line intact:

    <?php if (function_exists(’keywordluv_name’)) keywordluv_name();?>

  6. Save the file and FTP it up to the wp-content/themes/[yourtheme] folder on the server, overwriting the original file.

There is one problem with this approach. In the Comments management section in the Admin area, you will not the person’s name. You will only see their keywords. There is no way around this.

2. Change Your Theme To Use comment_author_link()

This is better than using the Compatibility Mode, but is harder to implement. There is also a chance that your theme doesn’t use comment_author_link() because it does something special using the other technique. DO NOT attempt this unless you are comfortable editing themes.

  1. Use FTP to go to the wp-content/themes/[yourtheme] folder on your server and download the comments.php file.
  2. IMPORTANT: Make a copy of the comments.php file so you can put it back if something goes wrong.
  3. Edit the comments.php file and find the line that adds the comment author’s name. It normally looks something like this:

    <a href="<?php comment_author_url();?>"><?php comment_author();?> </a>

  4. Replace this with the following:

    <?php comment_author_link() ?>

  5. Save the file and FTP it up to the wp-content/themes/[yourtheme] folder on the server, overwriting the original file.

NOTE: The problem mentioned in the Compatibility Mode section (names not appearing in Comments management) will not occur with this approach.

3. Decide Not To Use The Plugin

Obviously, I’d like as many people to use the plugin as possible, but if it doesn’t work with your theme and you’re not comfortable with the above options, the last choice to not use KeywordLuv.

Final Thoughts

Hopefully this information will help you decide what action to take. If you need any further information, please contact me and I’ll help you if I can. Thanks for considering KeywordLuv.

Subscribe To Site:
Share and Enjoy:
  • Twitter
  • Sphinn
  • DZone
  • Design Float
  • del.icio.us
  • StumbleUpon
  • LinkedIn
  • Tumblr
  • Posterous
  • Digg
  • Facebook
  • Reddit

25 Comments

  1. We were going to install the plugin, but we hesitated when we saw the warning about potential theme uncompatibility… and now we’ve run out of time. (We’re always getting too sidetracked tweaking our blog when we should be working on other projects.)

    At first I thought, well great – but what if it doesn’t work with the next theme I switch to… but then I found this post with your hacks.

    I’m sure I’d be able to implement your hacks to make the plugin work… it’s just a question of convenience.

    Any possibility of making the switch between author_link and the other versions as easy as clicking a toggle box on an options page? (”If KeyWordLuv doesn’t work with your theme, blah, blah, blah?)

    Could you do the same with the dofollow option? (or would that just complicate things with other dofollow plugins. I know you’re trying not to duplicate work, but I wonder about new bloggers who are just learning about plugins. Maybe the thought of adding another plugin would be a limiting factor?)

    Last question for you as a plugin developer. We heard running multiple plugins slows the blog down. Would it be better for KeyWord to have that dofollow functionality so we could get rid of our dofollow plugins, or does it not really matter?

    I don’t know. Just some thoughts. Good luck.

    Mark’s last blog post..You Just Won 5 bucks! – 5 Dollar Comment Contest Winner

    1. Hi Mark.

      I should make this clear. If your theme is not compatible, then the only bad thing that will happen is that links containing the @ symbol will look like:

      Stephen @ Custom WordPress Plugins Says

      instead of:

      Stephen from Custom WordPress Plugins Says

      It’s hardly the end of the world! I may have played it up a little to much! :)

      Unfortunately there’s no way to automate the hack to incompatible themes. The only way to do it is to manually change the theme. A plugin can’t access the bit which needs to be changed.

      Good point about adding DoFollow for new bloggers. I have very limited time at the moment, so it’s unlikely I can do it in the short term, but it is something I’ll consider for the medium term.

      Running too many plugins can slow down the blog, because each plugin needs to do its thing. However you wouldn’t really save anything if KeywordLuv was Dofollow and you disabled your current Dofollow plugin. KeywordLuv would just do the work instead. You might save one or two hooks if KeywordLuv was running at that time anyway, but the saving would be miniscule.

      Thanks for the thoughts and good luck not getting sidetracked (I know that feeling all too well!).

      1. I do not think it is a problem at all having your name as well as blog title linked in the case of incompatibilities.

        I am off to install the plugin myself now but wanted to try your ‘reply to’ feature which is nifty too.

  2. [...] issue, along with the possible workarounds, is outlined on the KeywordLuv – Theme Compatibility Issue [...]

  3. I gave it a try but just like commentluv it wouldn’t work. Seems this them won’t let plugins work in the comment field :(

  4. Thank you for offering this information and giving the resources to find it. It is refreshing to find bloggers that go the extra step for their readers. These are the blogs that are truly destined to succeed.

  5. Keywordluv…I would still be working a nine to five right now if this tool wasnt out. It brought me so much traffic and revenue that my internet business is now lucrative enough to live off of….God bless keywordluv

  6. Nice article. I took Keyword Luv off my site as it was playing up. I’ll give this tip a shot and see what happens. Thanks.

  7. I have seen a few sites that do not have it working correct. One other problem i have seen is with comment luv simetimes it work sometimes site has problems. Not sure why.

    Since the plugin is so popular now people should list if the theme is compatible with it and comment luv.

  8. Mine is working fine. Wordpress 2.7.1 and Cutline from Chris Pearson

    Thanks

  9. Hey Stephen,
    Love the plug-in, but Im having one small thing that keeps me from being able to use it. The people who use IE seem to be able to comment fine, but those who use FF, they cant click the ’submit’ button. Any ideas why or how to fix? thanks!

  10. Nice step by step guide. Makes it alot easier to set up keyword luv on site. Thanks you took all the guess work out of it and showed the exact steps to install it correctly.

  11. Wow this helped me figure out how to configure one of my sites. Thanks for the guide.

  12. I’m deciding whether or not I should move to WordPress platform. I’m currently using Blogger, and Blogger doesn’t have plugins like this.

    1. Kai, the best thing that you can do would be to host your own blog, and WordPress is the best platform as far as I am concerned. Especially now that I have bought the most flexible theme that doesn’t require any code knowledge at all.

  13. This is an excellent plugin! It’s so useful for my blogs and also for finding other blogs that allows keywords. :)

  14. Thanks for your article, this is the article that I looking for all day for my students learning buddy,and you solved my problem, once again thanks :)

  15. I’m using iNove cause I like that theme a lot. Turns out, KeywordLuv is not compatible with the theme or the theme is not compatible with the plugin. LOL

    So I use compatability mode. The name may not appear on the comment section but a recent comment plugin shows it so I have no problem with that at all. Thanks so much for this plugin.

    And yeah, I made my blog a dofollow one, and I hope I can keep up with future spam. LOL

  16. Hi,
    according to my files my theme is compatable – it uses comment_author() in the comments.php file.
    But when I type in the name field it won’t let me type in
    Russ@BabyVideoMonitors – It won’t let me type Capital letters and whatever I do with my caps lock it types as russ@babyvideomonitors and in the front end my post says russ from babyvideomonitors

    (I even tried to paste in Russ@BabyVideoMonitors and it altered the capitals back to lower case)

    Is this common or something to do with my theme that I can alter?

    thanks
    Russ (you have my email address)

  17. Hi! My name is David. Thanks so much for this post about keywordluv. I’m just getting used to using teh plugin myself. I would like to know if I need to put a space between my name, the @ and my keywords. By the way, what plugin did u use that lets me see my comment below as I’m typing it? Very cool! Thanks, David :-)

  18. i put php if (function_exists(’keywordluv_name’)) keywordluv_name(); on my comment.php , it’s work. Thanks

  19. Great blog and I also notice you’re using the keywordluv plugin which I think is great! However, some blogs are now disabling this feature, is google starting to frown upon this plugin? Or are bloggers regretting opening their doors to those who may not be at all interested in their content? My personal opinion is it’s a win win situation for all concerned… the blog owner gets people reading their page and those who comment get a link and potential traffic! Keep up the good work..

  20. Hi, I have been running the keyword luv plugin for a while on many of my sites, but when I check my sites in google with site:besthostingservice.org I am getting about 6 or 7 results just for this plugin, and a couple of them look like this, on most of my sites. I use the flexible 2 template for most sites. Any idea why this is happening?
    Thanks Glenn

    Fatal error: Call to undefined function __() in /home/best6599 …
    Fatal error: Call to undefined function __() in /home/best6599/public_html/wp-content/plugins/commentluv/commentluv.php on line 29.
    besthostingservice.org/wp-content/plugins/…/commentluv.php – Cached

    1. Hi Glenn,

      I see what you mean!

      All of these error messages that have been indexed appear to be related to the CommentLuv plugin, not the the KeywordLuv plugin. CommentLuv is written by Andy Bailey – you should probably contact him: Twitter: @CommentLuv, Website: ComLuv.

      Best of luck..

  21. Anyway, the biggest problem that I find is finding sites to place my backlinks on. So many sites are “no follow” which are about as helpful to your search engine rankings as an umbrella when you are at the bottom of the ocean! Other sites are “do follow” and there is scope for adding a link (normally in the form of a comment).

Leave a comment

THIS BLOG IS NO LONGER DOFOLLOW

Rules: Leave your name! No inappropriate or offensive comments. No links to inappropriate or offensive sites. Comments must contribute to the discussion.

This site uses KeywordLuv. Enter YourName@YourKeywords in the Name field to take advantage.


Get your ad shown hereGet your ad shown hereWPVote - Digg for WordPress Lovers Advertise

WordPress Plugins by Stephen Cronin

Want a Custom WordPress plugin? See my Services page.

Greasemonkey Scripts by Stephen Cronin

Visit my home page at Userscripts.org.