WordPress.org

Support

Support » Plugins and Hacks » [Resolved] Integrate SEO Facebook Comments on custom recent comments tab

[Resolved] Integrate SEO Facebook Comments on custom recent comments tab

  • I’m using a custom theme i’ve bought and had to do some manual editing on parts of the theme’s code in order to this to work but right now everything is fine.
    However, this theme has a “recent comments” tab that shows, of course, the latest comments to the site and i’d love to keep it up and running.

    I thought SEO Facebook Comments would insert comments on this tab also but i’m not THAT lucky so… Getting on the widget code i’ve saw that the latest comments are being retrived with this code:

    $recent_comments = "SELECT DISTINCT ID, post_title, post_password, comment_ID, comment_post_ID, comment_author, comment_author_email, comment_date_gmt, comment_approved, comment_type, comment_author_url, SUBSTRING(comment_content,1,110) AS com_excerpt FROM $wpdb->comments LEFT OUTER JOIN $wpdb->posts ON ($wpdb->comments.comment_post_ID = $wpdb->posts.ID) WHERE comment_approved = '1' AND comment_type = '' AND post_password = '' ORDER BY comment_date_gmt DESC LIMIT $number";

    Can someone please point me how can i add the facebook comments on this query?

    Thx in advance

    http://wordpress.org/extend/plugins/seo-facebook-comments/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Find comment_type = ” and replace it to comment_type = ‘comment’

    New code:

    $recent_comments = "SELECT DISTINCT ID, post_title, post_password, comment_ID, comment_post_ID, comment_author, comment_author_email, comment_date_gmt, comment_approved, comment_type, comment_author_url, SUBSTRING(comment_content,1,110) AS com_excerpt FROM $wpdb->comments LEFT OUTER JOIN $wpdb->posts ON ($wpdb->comments.comment_post_ID = $wpdb->posts.ID) WHERE comment_approved = '1' AND comment_type = 'comment' AND post_password = '' ORDER BY comment_date_gmt DESC LIMIT $number";

    Thank you, it worked as expected.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Resolved] Integrate SEO Facebook Comments on custom recent comments tab’ is closed to new replies.