• Trying to enable Comments for a client and not having any luck. I’ve updated the Discussion settings to enable them. I’ve tested turning them on and off from individual posts. I’ve added a comments plugin to see if that will work, but nothing. The comments.php file is there, but I can’t tell if it’s missing any code that might be required. There doesn’t seem to be any custom CSS that’s hiding the comments section. Any help would be greatly appreciated.

    https://www.annecarbert.ca

    Thank you.

Viewing 8 replies - 1 through 8 (of 8 total)
  • Hi, @ljknechtel. Have you verified that the single.php file is making a call to the comments template? For example, this is how that’s done in TwentySixteen’s single.php file:

    // If comments are open or we have at least one comment, load up the comment template.
    	if ( comments_open() || get_comments_number() ) {
    		comments_template();
    	}
    Thread Starter ljknechtel

    (@ljknechtel)

    Hi @girlieworks. Thanks for your response. I believe theme was custom coded by original developer. Single.php code is as follows. I don’t see a call as per your response.

    <?php
    /**
     * The Template for displaying all single posts.
     *
     * @package WordPress
     * @subpackage Twenty_Eleven
     * @since Twenty Eleven 1.0
     */
    
    get_header(); ?>
    
    	<div id="primary">
    		<div id="content" role="main">
    
    			<?php while ( have_posts() ) : the_post(); ?>
    
    				<?php get_template_part( 'content', 'single' ); ?>
    
    				<nav id="nav-single">
    					<h3 class="assistive-text"><?php _e( 'Post navigation', 'twentyeleven' ); ?></h3>
    					<span class="nav-previous"><?php previous_post_link( '%link', __( '<span class="meta-nav">&laquo;</span> Previous post', 'twentyeleven' ) ); ?></span>
    					<span class="nav-next"><?php next_post_link( '%link', __( 'Next post <span class="meta-nav">&raquo;</span>', 'twentyeleven' ) ); ?></span>
    				</nav><!-- #nav-single -->
    
    				<?php /* comments_template( '', true ); */ ?>
    
    			<?php endwhile; // end of the loop. ?>
    
    		</div><!-- #content -->
    	</div><!-- #primary -->
    
    	<?php get_sidebar(); ?>
    
    	<div class="cb"></div>
    
    <?php get_footer(); ?>

    @ljknechtel, it’s there, it’s just been commented out:

    <?php /* comments_template( '', true ); */ ?>

    So, try removing those /* and */ in there to see if that fixes things.

    Thread Starter ljknechtel

    (@ljknechtel)

    Thanks again @girlieworks.

    Tried it but got a 406 (Not Acceptable) error when saving. Reverted to original code and saved and still got 406 error. Something not right with file, methinks.

    It doesn’t have anything to do with the association with the twentyeleven theme? I’m sure that theme was used to create the custom template, but its name is ‘Anne Carbert’.

    For the 406 error, you might need to get in touch with your host — assuming that the code looked just like this when you were done:

    <?php comments_template( '', true ); ?>

    then I can’t think of any reason why it would cause a problem when saving the file.

    Thread Starter ljknechtel

    (@ljknechtel)

    Thanks again. Will dig in a bit further.

    Thread Starter ljknechtel

    (@ljknechtel)

    Thank you, @girlieworks. Was able to update the file through the cPanel and did the trick.
    Much appreciated.

    @ljknechtel, you’re welcome, I’m glad you were able to get it sorted out!

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Comments form not showing up’ is closed to new replies.