I have a plugin for using Facebook-comments on my website. This works great, but instead of having to enter the specific post to comment, I want the comments to show right below each post at the home page.
Url: www.frognerfoto.no
Julio Potier answers:
Hello
you have to modify the plugin of course, can you link it ?
I'll try modifiy it in 2mn
ps: $5 is really cheap :o
Dag comments:
Link: http://we8u.com/facebook-comments/
$5 might be cheap, but if you modify it in 2min, you have an hourly rate at $150. ;)
Luis Abarca answers:
<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_US/all.js#xfbml=1";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
<!-- Inside the loop
-->
<div class="fb-comments" data-href="<?php the_permalink() ?>" data-num-posts="2" data-width="500"></div>
Luis Abarca comments:
OR make it dynamic with bloginfo('url')
<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_US/all.js#xfbml=1";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
<div class="fb-comments" data-href="<?php bloginfo('url') ?>" data-width="500"></div>
Luis Abarca comments:
Maybe this way, for each post put the comments below the excerpt
<head>
<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_US/all.js#xfbml=1";
fjs.parentNode.insertBefore(js, fjs);
}(document, 'script', 'facebook-jssdk'));</script>
</head>
<body>
...
<?php if (have_posts()) : // ?>
<?php while (have_posts()): ?>
<?php the_title() ?>
<?php the_excerpt() // or the_content() ?>
<div class="fb-comments" data-href="<?php the_permalink() ?>" data-width="500"></div>
<?php endwhile ?>
<?php endif ?>