Fancy Facebook Comments Shortcode

If you are using Fancy Facebook Comments plugin, follow the steps mentioned below to enable Facebook Comments in the content of individual page/post.

You would like to read this post to use the shortcode without causing any problems at your site.

Fancy Facebook Comments Shortcode

You can use [Fancy_Facebook_Comments] Shortcode in the content of required page/post where you want to display Facebook Comments interface.

Example
[Fancy_Facebook_Comments]


You can use following attributes in the Shortcode

style

Use style attribute to style the rendered interface

Example
[Fancy_Facebook_Comments style="background-color:#000;"]


title

Use title attribute to specify title above commenting interface.

Example
[Fancy_Facebook_Comments title="Comment Time!"]


url

Use url attribute to specify the target url for comments. This defaults to the page where shortcode is used.

Example
[Fancy_Facebook_Comments url="http://mywebsite.com/page2"]


heading_tag

Use heading_tag attribute to specify the HTML tag for the title text. This defaults to “div”.

Example
[Fancy_Facebook_Comments title="Fancy Facebook Comments" heading_tag="h3"]


num_comments

Use num_comments attribute to specify the number of comments to display.

Example
[Fancy_Facebook_Comments num_comments="5"]


order_by

Use order_by attribute to control the order of comments being displayed in the Facebook Comments interface.

Possible values:

  • social: Default. Top comments first.
  • reverse_time: Latest comments first
  • time: Oldest comments first

Example
[Fancy_Facebook_Comments order_by="reverse_time"]


width

Use width attribute to specify the width of commenting interface. Omit it for fluid (auto-adjustable) width

Example
[Fancy_Facebook_Comments width="200"]


language

Use language attribute to specify the language code for commenting interface. Value should be the code of the desired language. You can find the language codes at this link. Leave it empty for default language(English)

Example
[Fancy_Facebook_Comments language="es_ES"]


dont_load_sdk

Use dont_load_sdk=”1″ attribute if Facebook SDK is already being loaded at your webpages. This will stop the Fancy Facebook Comments plugin from loading another Facebook SDK.

Example
[Fancy_Facebook_Comments language="es_ES"]


You can use shortcode in PHP file as following

<?php echo do_shortcode(‘SHORTCODE’) ?>

Replace SHORTCODE in above code with the required shortcode like [Fancy_Facebook_Comments style=”background-color:#000;”], so the final code looks like following
<?php echo do_shortcode('[Fancy_Facebook_Comments style="background-color:#000;"]') ?>