Discourse comment box appearing 2 times

My bad, I was not looking at the right issue!
I thought you were talking about just this one:


I think your issue is expected.
Astra theme doesn’t support the Full Site Editing feature or work with blocks.
In other words, Astra is not a block theme, and to customize pages, you need to use a third-party page builder (such as Elementor, in your case).

You will surely see a duplicate if you are not using the Discourse block to replace the original Comment block. Angus shows what you would need to do if you had a block theme in his video: WP Discourse Comments Block.

You are not replacing the comment area when you add the Discourse block using hooks; you place custom code at a specific location.


What is the solution?

If you prefer the look/location of the Astra hook, there is a way to remove the native WP comment area. You can add this PHP code. See How to Add Custom PHP Code in the Astra Theme? if you need help with how.

add_action(
	'init',
	function() {
		if ( class_exists( 'Astra_Loop' ) ) {
			remove_action( 'astra_template_parts_content', array( Astra_Loop::get_instance(), 'template_parts_comments' ), 15 );
		}
	},
	11
);

Hope that helps!

4 Likes