Created
November 10, 2015 02:06
-
-
Save robneu/7b7a23494a90e04eb9dd to your computer and use it in GitHub Desktop.
Code snippet to disable the WP Featherlight plugin on singular posts.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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