WordPress.org

Ready to get started?Download WordPress

Forums

SEO Facebook Comment
Woocommerce reviews/comments (2 posts)

  1. Michif
    Member
    Posted 6 months ago #

    Dear support,

    I've installed your great plugin, but got an issue - I use it within woocommerce and now I have the facebook comments below the products instead of Woocommerce reviews/ratings. I would like to keep the FB comment below the posts, but turn it off below the products. What can I do? Can you help me?

    https://wordpress.org/plugins/seo-facebook-comments/

  2. eCae7an0s
    Member
    Posted 6 months ago #

    Hey!
    I was with the same problem, and I solved this way.

    In the file seofacebook.php, around line 437, I added an
    if( !(is_product()) ) to all this lines:

    $postUrl = get_permalink($postId);
    
                    # Only insert Facebook Comments if App ID and Secret is set
                    if (!empty($this->options['app']) && !empty($this->options['secret']) )
                    {
                        $this->loadJS();
                        echo "<div id=\"fbSEOComments\" style=\"width:{$this->options['width']}\">";
                        echo "<h3>" . __('Leave a Reply', 'virtue') . "</h3>";
                        self::fbAddComment($postUrl, $postId, $comments);
                        echo "</div>";
                    }
                    else // If no application ID or application secret are set ask the user to set one
                    self::fbHandleNoAppId();
    
                    return $comments;

    Then, I replaced the line 219, by this:
    if ( isset($this->options['hideComments']) && !(is_product()) )

Reply

You must log in to post.

About this Plugin

About this Topic

Tags

No tags yet.