Activating the child theme the comments are no longer visible.
What could be the problem?
Hi There,
Could you please update the code in your functions.php
file?
Thanks.
This is my function.php on child theme.
I put the last two lines to try but it does not work … and I set the template “Fullwidth Post Layout” but it does not go …
Hi There,
Please delete this code:
add_action('x_before_the_content_end','page_comment');
Regards!
I deleted the line but it still does not work …
Hi There,
Would you mind providing us with login credentials(by clicking on the Secure Note button at the bottom) so we can take a closer look? To do this, you can make a post with the following info:
- Link to your site
- WordPress Admin username / password
Thanks.
I look forward to hearing from you.
Hi There,
Are you using the Disqus or the default Wordpress comment?
Could you please try disabling the Disqus comment plugin and also clear all the caches?
Let us know how it goes!
I tried without disqus but it works only without the child theme.
Comments are only activated on articles in Italian.
Hi there,
You also disabled the line add_filter( 'comments_open', '__return_true');
, that’s the code that enforce comment section to be displayed.
Please remove //
to enable it again, and if it’s not working, please provide the exact URL where it’s not displaying. Or are you expecting to see a comment section in a page type with page templates (full-width)?
Thanks!
Hello,
the line has been commented by his colleague,
I expect the comments in this type of page: https://discovermessina.it/mostra-antonello-da-messina/
If you try to activate the parent theme the comments appear
Hello There,
This issue is because of your customization with the wp-single.php (https://prnt.sc/i3n8kj). The comments section were remove in your child theme.
https://image.prntscr.com/image/ODGkHhRzT6Krm1akv_ybqQ.png
The original code is this:
<?php
// =============================================================================
// VIEWS/RENEW/WP-SINGLE.PHP
// -----------------------------------------------------------------------------
// Single post output for Renew.
// =============================================================================
$fullwidth = get_post_meta( get_the_ID(), '_x_post_layout', true );
?>
<?php get_header(); ?>
<div class="x-container max width offset">
<div class="<?php x_main_content_class(); ?>" role="main">
<?php while ( have_posts() ) : the_post(); ?>
<?php x_get_view( 'renew', 'content', get_post_format() ); ?>
<?php x_get_view( 'global', '_comments-template' ); ?>
<?php endwhile; ?>
</div>
<?php if ( $fullwidth != 'on' ) : ?>
<?php get_sidebar(); ?>
<?php endif; ?>
</div>
<?php get_footer(); ?>
Please edit the code and use the original code instead to display the comments.
thank you so much!
I have deleted the file directly. I did not need …
Thanks again, see you soon
You’re welcome.
This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.