* Boot Store theme is based on Twentytwelve theme. The official WordPress theme.
*
* @package WordPress
* @subpackage Boot Store
* @since Boot Store 1.0
*/
?>
>
get_post_types( array( 'public' => true ) ),
'posts_per_page' => -1,
'post_status' => 'publish',
'order' => 'DESC',
'meta_query' => array(
array(
'key' => 'bre_add_to_home_carousel',
'value' => true,
'compare' => '=',
),
),
'fields' => 'ids'
);
$carousel_posts = get_posts( $carousel_args );
//If not post to show in the carrousel, the last 5 posts will be loaded
if ( is_array( $carousel_posts ) && count( $carousel_posts ) == 0 ) $carousel_posts = get_posts( array( 'fields' => 'ids' ) );
if ( is_array( $carousel_posts ) && count( $carousel_posts ) > 0 ) : ?>