Title Above Facebook Comments Plug-in

Hello there.
I have successfully installed/activated the Facebook Comments plugin, but I want the old “Leave a reply” headline (which I changed to “Compliments + Critiques”) to still be there. I don’t know how to do .php on my own. Guidance?

Hello @houseofleopold,

This will require a bit of customization. Please create the _comments-template.php file in wp-content/themes/pro-child/framework/views/global directory. You can do this through FTP. Then add this code to the file:

<?php

// =============================================================================
// VIEWS/GLOBAL/_COMMENTS-TEMPLATE.PHP
// -----------------------------------------------------------------------------
// Comments output for pages, posts, and portfolio items.
// =============================================================================

$stack           = x_get_stack();
$container_begin = ( $stack == 'icon' ) ? '<div class="x-container max width">' : '';
$container_end   = ( $stack == 'icon' ) ? '</div>' : '';

?>

<?php if ( comments_open() ) : ?>
  <?php echo $container_begin; ?>
    <h2><?php echo get_the_title(); ?></h2>
    <?php comments_template( '', true ); ?>
  <?php echo $container_end; ?>
<?php endif; ?>

Then add this code in X > Theme Options > CSS:

#comments .fb-comments iframe {
    width: 100% !important;
}

Kindly note that since this is a custom code that changes the default behavior/display of the theme, you will be responsible to maintain or update the code in case you require further changes or if the code stops working in future updates. If you are uncertain how to proceed, it would be best to get in touch with a developer.

Hope this helps.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.