Removing comments
-
Topic
-
I can see this work but just thought it would be best to get a nod! I have learned that just because something seems to work it does not mean is smart!
// Remove comments function themeblvd_show_comments() { global $post; $show = true; if( is_single() ) { if( themeblvd_get_option( 'single_comments', null, 'show' ) == 'hide' ) $show = false; if( get_post_meta( $post->ID, '_tb_comments', true ) == 'hide' ) $show = false; else if( get_post_meta( $post->ID, '_tb_comments', true ) == 'show' ) $show = true; // My chunk if ( has_post_format ( 'link' ) || has_post_format ( 'quote' ) || has_post_format ( 'status' ) || has_post_format ( 'video' ) || in_category ( 106 )) $show = false; } return $show; }
I did not know this function so went looking for native tricks but as it often goes there is no clear message and I get confused.
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- You must be logged in to reply to this topic.