Homepage › Community Forums › General › How to remove comments from Epik Theme
Tagged: remove comments
I am trying to remove comments from the Epik theme via the child theme functions.php file.
Here is what I have tried so far:
Attempt 1:
// Remove post comments add_action( ‘wp_enqueue_scripts’, ‘custom_remove_comments’ ); function custom_remove_comments(){ remove_action( ‘genesis_after_post’, ‘genesis_get_comments_template’ ); }
attempt 2:
function pw_remove_genesis_comments() { remove_action( ‘genesis_after_post’, ‘genesis_get_comments_template’ ); }
add_action( ‘wp_enqueue_scripts’, ‘pw_remove_genesis_comments’ );
any insight into why these are not working, or what the correct php code is?
I have checked several blogs and the studiopress code snippets sites already— no luck.
You should be able to remove comments from WordPress admin itself rather than the Epik theme. Go to Settings > Discussion and you’ll see the options to remove the comments on that page. It should work the same on any theme that you use.
I create awesome sites for awesome people! Contact me if interested – ericsanchez1585@gmail.com