'page', 'post__in' => ( array ) $page_ids, 'posts_per_page' => absint( $gallery_slider_count ), 'orderby' => 'post__in', ); // Run The Loop. $query = new WP_Query( $args ); if ( $query->have_posts() ) : $i = 1; while ( $query->have_posts() ) : $query->the_post(); $page_post['id'] = get_the_id(); $page_post['title'] = get_the_title(); $page_post['url'] = get_the_permalink(); $page_post['image'] = has_post_thumbnail() ? get_the_post_thumbnail_url( get_the_id(), 'medium_large' ) : get_template_directory_uri().'/assets/uploads/no-featured-image-600x450.jpg'; // Push to the main array. array_push( $content, $page_post ); endwhile; $i++; endif; wp_reset_postdata(); if ( ! empty( $content ) ) { $input = $content; } return $input; } endif; // slider section content details. add_filter( 'blogmax_filter_gallery_slider_section_details', 'blogmax_get_gallery_slider_section_details' ); if ( ! function_exists( 'blogmax_render_gallery_slider_section' ) ) : /** * Start slider section * * @return string slider content * @since Blogmax 1.0.0 * */ function blogmax_render_gallery_slider_section( $content_details = array() ) { $options = blogmax_get_theme_options(); $gallery_slider_autoplay_enable = ($options['gallery_slider_autoplay_enable']) ? 'true' : 'false'; if ( empty( $content_details ) ) { return; } ?>