Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #668683

    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&#8221; 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?

    #670346

    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

    #670362

    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.

    #670380

    Hi!

    Glad you figured it out!
    That looks totally fine :)
    Let us know if you have any other questions or issues

    Regards,
    Yigit

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Facebook comments code in single.php’ is closed to new replies.