get_queried_object_id();
$output = '';
if ( 'enable-slider-allpage' == $enableslider || ( ( is_front_page() || ( is_home() && $page_for_posts != $page_id ) ) && 'enable-slider-homepage' == $enableslider ) ) {
if ( !$output = get_transient( 'simplecatch_slider_display' ) ) {
$output = '
';
$output .= simplecatch_page_post_category_slider( $options );
$output .= '
';
}
set_transient( 'simplecatch_slider_display', $output, 86940 );
}
echo $output;
} // simplecatch_slider_display
endif;
add_action( 'simplecatch_after_headercontent', 'simplecatch_slider_display', 20 );
if ( ! function_exists( 'simplecatch_page_post_category_slider' ) ) :
/**
* This function to display featured posts on homepage header
*
* @get the data value from theme options
* @displays on the homepage header
*
* @useage Featured Image, Title and Content of Post
*/
function simplecatch_page_post_category_slider( $options ) {
$postperpage = $options['slider_qty'];
$slidereffect = $options['remove_noise_effect'];
$output = '';
$args = array();
$args = array(
'posts_per_page' => $postperpage,
'post__in' => $options['featured_slider'],
'orderby' => 'post__in',
'ignore_sticky_posts' => 1 // ignore sticky posts
);
$loop = new WP_Query( $args );
$i=0;
while ( $loop->have_posts() ) {
$loop->the_post();
$i++;
$title_attribute = the_title_attribute( 'echo=0' );
$excerpt = get_the_excerpt();
if ( $i == 1 ) {
$classes = "slides displayblock";
} else {
$classes = "slides displaynone";
}
$output .= '