Created
April 9, 2019 14:11
-
-
Save jan-koch/e173daa2cc544b298bdf74d9236984d3 to your computer and use it in GitHub Desktop.
Remove comments from the single post layout in the WP Astra theme. This snippet goes into your functions.php.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Remove the default comments from Astra. | |
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 | |
); |
It works, thanks!
Awesome, Thanks.
You're welcome, didn't even remember I have this file here. Glad it still is helpful!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks!