Skip to content

Instantly share code, notes, and snippets.

@Pross
Last active December 15, 2015 23:09
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Pross/5338286 to your computer and use it in GitHub Desktop.
Save Pross/5338286 to your computer and use it in GitHub Desktop.
hide carousel for ie8 on a page.
add_action( 'template_redirect', 'carousel_ie8' );
function carousel_ie8() {
$page = 96; // <=== YOU MUST SET THE PAGE ID HERE
global $post;
if( ! is_object( $post ) || $page != $post->ID )
return;
$oset = array( 'post_id' => $post->ID );
if( 8 == pl_detect_ie() )
update_post_meta( $post->ID, '_hide_templates-gamma_PageLinesCarousel', 'on' );
else
update_post_meta( $post->ID, '_hide_templates-gamma_PageLinesCarousel', '' );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment