Skip to content

Instantly share code, notes, and snippets.

@jeherve
Created June 7, 2013 15:32
Show Gist options
  • Save jeherve/5730143 to your computer and use it in GitHub Desktop.
Save jeherve/5730143 to your computer and use it in GitHub Desktop.
[Jetpack] Remove Comment form from Carousel View. It will also remove the comment from all Attachment pages.
function tweakjp_rm_comments_att( $open, $post_id ) {
$post = get_post( $post_id );
if( $post->post_type == 'attachment' ) {
return false;
}
return $open;
}
add_filter( 'comments_open', 'tweakjp_rm_comments_att', 10 , 2 );
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment