WordPress.org

Ready to get started?Download WordPress

Forums

SEO Facebook Comment
[resolved] Integrate SEO Facebook Comments on custom recent comments tab (3 posts)

  1. ildario
    Member
    Posted 2 years ago #

    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/

  2. shappix
    Member
    Posted 1 year ago #

    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";

  3. ildario
    Member
    Posted 1 year ago #

    Thank you, it worked as expected.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic