Created
March 28, 2017 06:26
-
-
Save anonymous/4fc720b9e63d56d0ee41a76635c3ff40 to your computer and use it in GitHub Desktop.
This file contains 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
function education_hub_check_slider_status( $input ){ | |
global $post, $wp_query; | |
// Slider status | |
$featured_slider_status = education_hub_get_option( 'featured_slider_status' ); | |
// Get Page ID outside Loop | |
$page_id = $wp_query->get_queried_object_id(); | |
// Front page displays in Reading Settings | |
$page_on_front = get_option( 'page_on_front' ) ; | |
$page_for_posts = get_option( 'page_for_posts' ); | |
if ( 'entire-site' == $featured_slider_status || ( ( is_front_page() || ( !is_home() && $page_for_posts === $page_id ) ) && 'home-page' === $featured_slider_status ) ){ | |
$input = true; | |
} | |
else{ | |
$input = false; | |
} | |
return $input; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment