could you please provide the URL to your blog with the problem? thank you
Ok, the like with 29 likes is the number of likes you received for your homepage http://www.the4thofficial.co.uk – the 32 likes is the number of likes you received for your Facebook page http://www.facebook.com/pages/The-4th-Official/194869573877259
You can use the Like Box widget to display the number of Likes of your Facebook page, and also, allow people to like your page from the blog. More info about the Like Box widget is here: http://wp-connect.tomasvorobjov.com/docs/#widget-like-box
is there anyway to make the figure displayed on my frontpage to indicate the people who have liked my facebook page ….and not have to use the like widget to show this?
yes, you can use the WordPress Connect API, specifically the wp_connect_like_box function; you can and a line of code to your theme’s header.php (or anywhere else) – see this documentation for the details – if you disable show_face
, show_stream
and show_header
, you’ll get a small version of the like box and you can place it somewhere in the header.
To get just the number you can use Open Graph: eg http://graph.facebook.com/194869573877259 returns JSON formatted data that includes the number of likes
… this is an interesting idea, I’ll see if I can have it added for 2.0.1 (which is due this weekend)
p.s. you can experiment with the way the like box looks here
i think i’ll wait for your update 🙂
i’ve checked the links you’ve indicated above and i think it would be easier for me to learn Chinese than make the necessary changes to the code
ok, feel free to wait but even then some code editing will be needed … meanwhile if you’re up to it you can try this:
1.) on your dashboard, go to Appearance -> Editor
2.) on the right side there is a list of “templates”, click on “Header
(header.php)” and look for this line
<?php do_action('graphene_header'); ?>
3.) right after it, copy & paste the following code
<div style="position:relative;top:80px;left:28px">
<?php
$wpc_constants_file = WP_PLUGIN_DIR . '/wordpress-connect/src/WordpressConnectConstants.php';
if ( file_exists( $wpc_constants_file ) && function_exists( 'wp_connect_like_box' ) ){
require_once( $wpc_constants_file );
$like_box_width = 320;
$like_box_height = 60;
$colorscheme = WPC_THEME_LIGHT;
$show_faces = WPC_OPTION_DISABLED;
$show_stream = WPC_OPTION_DISABLED;
$show_header = WPC_OPTION_DISABLED;
// render the like box in place
wp_connect_like_box(
$like_box_width,
$like_box_height,
$colorscheme,
$show_faces,
$show_stream,
$show_header
);
}
?>
</div>
and hit “Update File”
4.) on your dashboard go to WP-Connect -> Like Box
and set http://www.facebook.com/pages/The-4th-Official/194869573877259
as the Like Box URL
and hit “Save Changes”