Move comments above Related Posts

Home Support Blog Way Move comments above Related Posts

This topic contains 4 replies, has 2 voices, and was last updated by  ProDesign Support 1 week, 4 days ago.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #17268

    KatieS
    Participant

    I’d like to move the blog post comment box to directly below my individual blog posts, rather than being placed after the Related Posts widget. How can I change the order of these two items? (I’m not a coder, but if code is needed, I do have a child theme set up–I’d just need very explicit instructions.)

    (My website is: http://www.katiesonger.com; as an example, one of my 3 blogs is http://www.katiesonger.com/politics.)

    Thanks,
    Katie

    #17329

    Hello There!

    Hope you are doing good!

    You will need to overwrite the “single.php” to perform the update.

    Please create the child theme, copy “single.php” file in the newly created child theme and then update the sequence of the sections as per the requirement.

    Hope this helps!

    Have a great day ahead!

    Regards,
    Team ProDesigns

    #17416

    KatieS
    Participant

    Thanks very much! I have a child theme and I see the comments section of single.php, but I’m not a coder and I’m afraid to modify the code without more instruction. Can you tell me exactly which code I should move, and exactly where I should put it to place the comments above the Related Posts widget?

    For example, I tried moving the following code:

    		// If comments are open or we have at least one comment, load up the comment template.
    		if ( comments_open() || get_comments_number() ) :
    			comments_template();
    		endif;
    
    	endwhile; ?>

    I placed it immediately before:

    do_action( 'blog_way_related_post' );

    However, that turned the Related Posts widget into code!

    Thanks,
    Katie

    #17417

    KatieS
    Participant

    Oh, wait! I think I figured it out–that “endwhile” shouldn’t have been included. So I moved the following code:

    		// If comments are open or we have at least one comment, load up the comment template.
    		if ( comments_open() || get_comments_number() ) :
    			comments_template();
    		endif;

    I placed it above

    do_action( 'blog_way_related_post' );

    I also got rid of four line breaks. Now the comments are where they should be. Thank you!

    #17450

    Hello There!

    Hope you are doing good!

    We are glad that the issue got resolved.

    Have a great day ahead!

    Regards,
    Team ProDesigns

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic.