I'm new to Wordpress and wanted to add a Facebook Like Box widget into the sidebar of my custom theme. I want to use this plugin : http://wordpress.org/plugins/facebook-like-box-paulund/
I've registered to allow widgets in the sidebar with the following code in the 'functions.php' file:
<?php
if ( function_exists('register_sidebar') )
register_sidebar(array(
'name' => 'sidebar',
'before_widget' => '<li>',
'after_widget' => '</li>',
'before_title' => '<h1>',
'after_title' => '</h1>',
));
?>
and then tried adding the facebook like box widget to the sidebar and its not appearing on the page. The plugin is not adding the following code into the page as it should do and I'm not sure why:
/**
* Add Facebook javascripts
*/
public function add_js(){
echo '<div id="fb-root"></div>
<script>(function(d, s, id) {
var js, fjs = d.getElementsByTagName(s)[0];
if (d.getElementById(id)) return;
js = d.createElement(s); js.id = id;
js.src = "//connect.facebook.net/en_GB/all.js#xfbml=1&appId='.$this->facebook_id.'";
fjs.parentNode.insertBefore(js, fjs);
}(document, \'script\', \'facebook-jssdk\'));</script>';
}
When I manually enter that piece of code into my page the facebook like box appears.
The custom theme/website I'm trying to create can be found here : http://www.test.mathanv.com/bask/
Help!