Moving comments section to left of content (Twenty Thirteen)

So I want to move my comments section to the left of my content in my Twentythirteen child theme. I’ve located where it’s pulled from in the content.php file:

        <?php if ( comments_open() && ! is_single() ) : ?>
        <div class="comments-link">
            <?php comments_popup_link( '<span class="leave-reply">' . __( 'Leave a comment', 'twentythirteen' ) . '</span>', __( 'One comment so far', 'twentythirteen' ), __( 'View all % comments', 'twentythirteen' ) ); ?>
        </div><!-- .comments-link -->
    <?php endif; // comments_open() ?>

    <?php if ( is_single() && get_the_author_meta( 'description' ) && is_multi_author() ) : ?>
        <?php get_template_part( 'author-bio' ); ?>
    <?php endif; ?>

Trouble is I’m not too sure where to move it too in terms of other php files? I’ve moved my secondary widget area to the left of the content (rather than the default right). Is there a way I can make a widget use this code and still work?

Thanks!

Edit: So I tried using the PHP Code Widget and C&P the above code it but it doesn’t display anything 🙁

1 Answer
1

Comments aren’t in the “footer”, they are in the Loop, and they need to be to keep their association with the parent post. That is why you are having trouble. You are moving them out of the context that Core expects. What you are going to have to do, I think (and I haven’t tested this), is explicitly pass the post ID to the relevant functions– comments_open() and is_single().

if ( comments_open($post->ID) && ! is_single($post->ID) ) :

Leave a Comment