Hi, I’m trying to set up Facebook comments on my posts right above the WordPress comments. Following another thread (https://kriesi.at/support/topic/facebook-comment-box/) I figured out what code to enter and where.
The code I’m entering is
<div class=”fb-comments” data-href=”http://www.surfset.sg” data-numposts=”5″></div>
and it works well.
But I need this to have the permalink of the post itself, so following some help pages, I used the php the_permalink thing and entered:
<div class=”fb-comments” data-href=”<?php the_permalink(); ?>” data-numposts=”5″></div>
and it no longer works.
Can you help me with this please?
Hey gohweihan,
Can you please create a temporary admin login and FTP logins and post it here privately so we can look into it?
Best regards,
Yigit
Thanks for the reply. I kept playing around and managed to get it to work nicely by adding this:
<div class=”fb-like” data-href=”<?php the_permalink(); ?>” data-layout=”standard” data-action=”like” data-size=”small” data-show-faces=”true” data-share=”true”></div>
<div class=”fb-comments” data-href=”<?php the_permalink(); ?>” data-width=”100%” data-numposts=”10″ data-order-by=”social” data-colorscheme=”light”></div>
<!–end content–>
Added it right before that end content tag. So far so good, but I have no experience in coding, so do let me know if this is not recommended for any reason.