WordPress.org

Forums

Facebook
[resolved] facebook_comments_wrapper (2 posts)

  1. jmeeter
    Member
    Posted 2 years ago #

    Can someone provide more documentation on how to use the "facebook_comments_wrapper" filter for enhanced SEO?

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

  2. Niall Kennedy
    Member
    Plugin Author

    Posted 2 years ago #

    The facebook_comments_wrapper filter allows your site to override the HTML element wrapping Facebook comments on your page. Some publishers rather not have any extra markup or the extra request to Facebook's servers and will return an empty string to bypass the functionality.

    The Facebook Comments Box social plugin is an HTML div element with properties evaluated by the Facebook PHP SDK after the page has loaded. Some search engines can evaluate this later insertion of dynamic HTML or may have created special indexing rules to pick up Facebook comments.

    The Facebook plugin for WordPress also builds on-page markup for existing comments stored on Facebook's servers. These comments are wrapped in an HTML noscript element by default, showing some comment markup when the page is interpreted by user-agents unable to evaluate JavaScript and the results of a Comments Box loaded by the Facebook JavaScript SDK. Including the comments under a noscript element is SEO-friendly since you know comments are output with the page for evaluation alongside your post content.

    If you would rather wrap the output of Facebook comments on your page in a div or section HTML element you may return a new value through the facebook_comments_wrapper filter and display server-side content to user-agents with JavaScript enabled.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Facebook
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags