Karen Doyle
asked 9 years ago

Hi,

This plugin https://wordpress.org/plugins/facebook-comments-plugin/ add facebook comment to all questions, answers and comments.
I do not know what to do πŸ™

That is the most popular plugin πŸ™

I hope you can help

1 Answers
DominicStaff
answered 9 years ago

Hi,
I need to debug directly on your site, please PM me url, admin credentials of your site. Regards,

termoplus
replied 9 years ago

Hi,

I do not see how can I write you PM.
Can you help me to find it?

termoplus
replied 9 years ago

Here is what I mean http://prntscr.com/8kev5r
this section on all questions, answers and comments.

you can install the plugin https://wordpress.org/plugins/facebook-comments-plugin/ and check as an option πŸ™‚

dominic Staff
replied 9 years ago

I have checked on our demo. To resolve this issue, you should uncheck the single post to display the faceboock comment. See the sreenshot: http://prntscr.com/8laiuu
You can also insert the shortcode directly into your theme with PHP:
<?php echo do_shortcode('[fbcomments url="http://peadig.com/wordpress-plugins/facebook-comments/" width="375" count="off" num="3" countmsg="wonderful comments!"]'); ?>
Very simple, you can open the single.php file then add the shortcode to instead the following code

<?php
if ( comments_open() || get_comments_number() ) :
comments_template();
endif;
?>

If you still face there issue, you can send me username & password of your site, I will help you add the shortcode.
Hope this helps !

termoplus
replied 9 years ago

Hi,

Thank you for your help.
I am still have problem with this,

1) If I unchecked this http://prntscr.com/8laiuu comments disappears from all posts.
2) I created a plugin this this code http://prntscr.com/8lhchj and my I broke my site with this error http://prntscr.com/8lhctl

3) I did’t try because my theme could be updated and I can lose my changes.

I dont know how to send the access to my site. It’s public forum. I don’t see PM here.
Please check on your demo. it should be the same.

It’s a headache for me :(((

thanks

dominic Staff
replied 9 years ago

Yes, I have installed the Facebook Comments Plugin in our demo and used the Twenty Fifteen theme to check. After activate plugin I have unchecked this http://prntscr.com/8laiuu to make the facebook comments disappears from all single posts.
And then open the single.php.
Replace the following code:

if ( comments_open() || get_comments_number() ) :
comments_template();
endif;

With new code:
echo do_shortcode('[fbcomments url="http://peadig.com/wordpress-plugins/facebook-comments/" width="375" count="off" num="3" countmsg="wonderful comments!"]');

NOTE: If you want to use the private answer, you can see the screenshot: http://prntscr.com/8lo3xm
Regards,

termoplus
replied 9 years ago

So I need to uncheck first, then in single.php find code started at if ( comments_open() and replace it with red one.Is that correct?

What if my theme will be updated? I would lose the changes?

termoplus
replied 9 years ago

Please do not forget about me πŸ™‚

dominic Staff
replied 9 years ago

Please accept my apology in the delay for getting back to you. At the moment, You only can change in the php page. When you update your theme you can copy the file that you customize to the backup folder then paste this file in the latest version. You can uncheck first or after.
Please send me username & password of your site (via private answer) I will help you resolve it.
Regards,

termoplus
replied 9 years ago

I checked single.php

My code is little different http://prntscr.com/8n45ze

May I change it? I want o do it by myself in order to remember for my theme updates.
thanks

dominic Staff
replied 9 years ago

Yes, you can replace the codes line as the following image (Screenshot).
With the shortcode of Facebook comment:
<?php echo do_shortcode('[fbcomments url="http://peadig.com/wordpress-plugins/facebook-comments/" width="375" count="off" num="3" countmsg="wonderful comments!"]'); ?>
If you still face there issue, you can send me username & password of your site (via private answer) I will help you resolve it.
Hope this helps !

termoplus
replied 9 years ago

Thanks! But it’s not working again :((
Here is an error I got on your plugins page
Parse error: syntax error, unexpected ‘<‘ in /var/www/website/data/www/website.com/wp-content/themes/heap/single.php on line 58

dominic Staff
replied 9 years ago

My confusion about the codes line in the single.php file from your site, sorry about that.
Right now, you can open the single.php file then replace the following code:

    <?php get_template_part( 'theme-partials/post-templates/single-content/footer' );

                // If comments are open or we have at least one comment, load up the comment template
                if ( comments_open() || '0' != get_comments_number() ) {
                    comments_template();
                } ?>

With new code:

<?php echo do_shortcode('[fbcomments url="http://peadig.com/wordpress-plugins/facebook-comments/" width="375" count="off" num="3" countmsg="wonderful comments!"]'); ?>

Regards,

Powered by DW Question & Answer Pro