Last active
October 6, 2016 02:05
-
-
Save neilgee/bbbd235501272130ebe8 to your computer and use it in GitHub Desktop.
Remove Comments based on Category
This file contains hidden or 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
<?php //<~ don't add me in | |
add_action( 'genesis_before_entry', 'wpb_remove_comments_category' ); | |
function wpb_remove_comments_category() { | |
if ( !in_category( 38 ) ) {//adjust your Category ID's in the conditional | |
remove_action( 'genesis_after_entry', 'genesis_get_comments_template' ); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment