I'm using the CoursePress plugin and theme. Is there a way

I'm using the CoursePress plugin and theme. Is there a way to add a comments feature to each page within a Unit? Facebook comments would be ideal.

  • Ash
    • WordPress Hacker

    Hello @msk5400

    I hope you are well today and thanks for asking the question.

    For that you have to create an app in facebook. Then add the following code in header.php just after body tag:

    <div id=&quot;fb-root&quot;></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 = &quot;//connect.facebook.net/en_US/sdk.js#xfbml=1&appId=APP_ID&version=v2.0&quot;;
      fjs.parentNode.insertBefore(js, fjs);
    }(document, 'script', 'facebook-jssdk'));</script>

    You need to replace APP_ID with the ID of your created app.

    Then go to single-unit.php and put the following code where you want the fb comment to be shown:

    <div class=&quot;fb-comments&quot;></div>

    I placed it in line 58.

    To create a FB app, please go to https://developers.facebook.com/ and then App > Add New App :slight_smile:

    Hope it helps :slight_smile: Please feel free to ask more question if you have.

    Cheers
    Ash

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.