You must have Javascript enabled to experience this site.

WordPress – Carousel without Jetpack

Posted & filed under Coding Tips.

Transform your standard galleries into an immersive full-screen experience without requiring you to connect to WordPress.com

This is a fantastic WordPress plugin that provides an impressive image gallery carousel without any coding (http://wordpress.org/extend/plugins/carousel-without-jetpack/).

One of the quirks though is that you can not disable comments. There is an option to show/hide photo exif data, but not one to control comments. As this seems to be a deliberate decision by the developer it is unlikely to change. Of course there is a way to fix this.

 

// Disable Comments on WordPress Media Attachments (Carousel without Jetpack)
// http://www.wpbeginner.com/wp-tutorials/how-to-disable-comments-on-wordpress-media-attachments/
function filter_media_comment_status( $open, $post_id ) {
    $post = get_post( $post_id );
    if( $post->post_type == ‘attachment’ ) {
        return false;
    }
    return $open;
}
add_filter( ‘comments_open’, ‘filter_media_comment_status’, 10 , 2 );

0 views