Skip to content

Instantly share code, notes, and snippets.

@robneu
Created November 10, 2015 02:06
Show Gist options
  • Save robneu/7b7a23494a90e04eb9dd to your computer and use it in GitHub Desktop.
Save robneu/7b7a23494a90e04eb9dd to your computer and use it in GitHub Desktop.
Code snippet to disable the WP Featherlight plugin on singular posts.
add_action( 'wp_enqueue_scripts', 'sitecare_disable_featherlight_singular_posts' );
/**
* Disable WP Featherlight on singular post entries.
*
* @author WP Site Care <http://www.wpsitecare.com/>
* @access public
* @return void
*/
function sitecare_disable_featherlight_singular_posts() {
if ( is_singular( 'post' ) ) {
add_filter( 'wp_featherlight_load_css', '__return_false' );
add_filter( 'wp_featherlight_load_js', '__return_false' );
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment