Site News WordPress Fixes

Facebook Connect

A quick personal wiki/how-to entry on getting the Facebook connect plugin working with a custom Wordpress theme.

A quick personal wiki/how-to entry on getting the Facebook connect plugin working with a custom WordPress theme.

I spent a good part of the day setting up the Facebook Connect plugin over at Motoringfile. I also set it up here, but haven’t spent nearly as long tweaking it. That means it’s personal wiki time! Weeeeeee

This plug-in does require a few things to work correctly.

You need to add this to the html line in header.php.


Also in the header you should have

<?php wp_head(); ?>
before your closing

In the footer, you need

<?php wp_footer(); ?>
right before your

Your theme should be widgetized. There is a code chunk at the plugin site if it’s not. I’ll be writing this up soon as well.

Once you do everything you need to do to get the plugin installed and configured so it works in your theme, then it’s time to make it look good in your theme as well.

The easiest way to do this is to copy the style from index.php. This includes the call to header.php and any styles that happen **before** the loop. You will also want to grab the call to footer.php. Paste all of that into the top and bottom of the following files.

  • myhome.php
  • community.php
  • userprofile.php
  • invitefriends.php

Once that is done, it should fit nicely into your theme. Don’t look at this one, yet. Go over and check it out at instead.

Finally, if you want to remove the check from the box in the comments, you will need to edit fbConnectInterface.php. Find the following line on or around line 47.

echo &#8216;<input style="width:20px;" type="checkbox" name="sendToFacebook" id="sendToFacebook" checked="checked" />&#8216;.__(&#8216;Publish this comment to Facebook&#8217;, &#8216;fbconnect&#8217;);

And remove the part that says


Save and upload back to the fbconnect folder.

I am available for questions or to assist you should you need it.

Leave a Reply

Your email address will not be published. Required fields are marked *

To create code blocks or other preformatted text, indent by four spaces:

    This will be displayed in a monospaced font. The first four 
    spaces will be stripped off, but all other whitespace
    will be preserved.
    Markdown is turned off in code blocks:
     [This is not a link](

To create not a block, but an inline code span, use backticks:

Here is some inline `code`.

For more help see

This site uses Akismet to reduce spam. Learn how your comment data is processed.