How to

How to add comments WordPress without a plugin

How to add comments WordPress without a plugin





Facebook comment with the website this allows user Facebook can put Word, Facebook Stickers, Link(URL), in the content website. If you need to add a Facebook comment with your site, What can you do?

With us, you don’t worry about that now you can add Facebook comments by yourself with a tutorial on the Below

  1. Go to address https://developers.facebook.com/docs/plugins/comments and put size width with you’re like.
  2. Click on “Get Code” and copy code on the below put with code Single Post (single.php).

Code Enable Facebook comments

<div id="fb-root"></div> <script async defer crossorigin="anonymous" src="https://connect.facebook.net/en_US/sdk.js#xfbml=1&amp;version=v4.0"></script>

And

<div class="fb-comments" data-href="https://developers.facebook.com/docs/plugins/comments#configurator" data-width="700" data-numposts="5"></div> 

Change code Facebook comments default.

Default

<div class="fb-comments" data-href="https://developers.facebook.com/docs/plugins/comments#configurator" data-width="700" data-numposts="5"></div>

Change to

<div class="fb-comments" data-href="<?php the_permalink(); ?>" data-width="700" data-numposts="5"></div>

Example: we using Flex Mag template we put code Facebook comment on end content code.

Image code
<?php if ( ! is_singular( 'scoreboard' )) { ?>
											<div class="post-tags">
												
												
												
											</div><!--post-tags-->
										<?php } ?>
										<?php $socialbox = get_option('mvp_social_box'); if ($socialbox == "true") { ?>
											
										<div id="fb-root"></div>
<script async defer crossorigin="anonymous" src="https://connect.facebook.net/en_US/sdk.js#xfbml=1&amp;version=v4.0"></script>
										
										<div class="fb-comments" data-href="<?php the_permalink(); ?>" data-width='700' data-numposts="10"></div>
										
										
										<?php } ?>
Enable Facebook comment in website wordpress
Enable Facebook comment in website WordPress

3. Click Button “Update File” and reload your site again will see Facebook comment on your website.

Conclusion
Facebook comments add on WordPress will easy.. when you using Plugin WordPress. But we recommend enabling Facebook comment by code ( Comments Plugin Code Generator ), It well, there is not much code on your website and you will get faster speed on your site.

Most Popular

To Top