WordPress.org

Forums

Facebook
[resolved] Facebook comment box not showing (4 posts)

  1. rahulkhosla
    Member
    Posted 1 year ago #

    Hi,

    Im building my very first custom theme on WP, so i'm new to this...

    I just installed and configured the official Facebook plugin, did all the secret key thing, disabled sandbox mode.

    I don't see comments showing on my posts, I tried adding this line of code:
    <div class="fb-comments" data-href="http://rahulkhosla.co.uk" data-width="700"></div>

    But they then appered the same on each post (and even in the summarys).

    All I want is to have Facebook comments displayed on the FULL post page (not the summary).

    My index.php file:

    <?php
    get_header();
    ?>
    <div id="main">
      <div id="content">
      	<h2><?php wp_title($display); ?></h2>
        <div id="blogHold">
        <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
        <h3><?php the_title(); ?></h3>
        <h4>Posted on <?php the_time('F jS, Y') ?></h4>
        <?php the_content('Read More'); ?>
        <hr>
        <?php endwhile; else: ?>
        <p><?php _e('Sorry, no posts matched your search criteria.'); ?></p>
        <?php endif; ?>
        </div>
      </div>
    
      <?php get_sidebar(); ?>
    
      </div>
    
    <?php get_footer(); ?>

    Please help!

    Thanks!

    My site: http://rahulkhosla.co.uk

    http://wordpress.org/plugins/facebook/

  2. Niall Kennedy
    Member
    Plugin Author

    Posted 1 year ago #

    When you set the data-href attribute to http://rahulkhosla.co.uk you instructed the Facebook Comments Box social plugin to display and solicit comments for your homepage, not the post permalink.

    It seems like you should be thinking in terms of single.php and comments_template(), not index.php.

  3. rahulkhosla
    Member
    Posted 1 year ago #

    http://rahulkhosla.co.uk/test-post/#more-47

    Thanks, but why do I now get 2 comments?

  4. rahulkhosla
    Member
    Posted 1 year ago #

    Never mind, had to delete old comments :P

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Facebook
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic