Archived topic
Comments section - Remove default if using the Comments block
3 replies · Started by Paul on December 21, 2022
Hi There,
I'd like the comments section to stay within the main column under the post content (design uses a sidebar built in a GenerateBlocks element). So I added I used a GeneratePress comments block to the main column that seems to work but now I have two comments section how do I remove the full width one within the GP theme?
(Perhaps using the WP comments block isn't the best way to achieve this?)
See link to example post in private info
Thanks
Paul
Hi there,
to remove the Theme display comments form, you can try adding this PHP Snippet to your site:
add_action( 'wp', function() {
remove_action( 'generate_after_do_template_part', 'generate_do_comments_template', 15 );
} );
Thanks David - that worked :)
Glad to hear that!