Configuring Google +1 Button With Word Press and Bad Behavior Plugin
The very valuable Bad Behavior plugin for WordPress causes conflicts with Google's recently introduced +1 button. The fix is very simple.
Symptoms: When you attempt to "+1" on a Word Press site that is using the Bad Behavior plugin, the +1 icon appears for a few seconds and then is replaced with a red exclamation point Error Icon that links to https://www.google.com/support/profiles/bin/answer.py?hl=en&answer=1199142&p=plusone_button_error
Solution: Whitelist the Google-owned netblock 18.104.22.168/16 in Bad Behavior's "whitelist.inc.php" file:
- Confirm that I'm telling the truth about who owns that block: open a terminal and run a whois
- In your /wp-content/plugins/bad-behavior/bad-behavior folder open the file whitelist.inc.php and add the netblock to the \$bb2_whitelist_ip_ranges array:
[sourcecode language="php"]\$bb2_whitelist_ip_ranges = array(
"22.214.171.124", // Digg whitelisted as of 2.0.12
"126.96.36.199", // Digg whitelisted as of 2.0.12
Save the file to your server and you should be all set.
- Donate some money to the Bad Behavior plugin project...