';
$this->section_title = ( $title ) ? $title : __( 'Latest Posts', 'alanah-free' );
$auto = ( $autoplay ) ? $autoplay : 'false';
$multislides = new WP_Query( $args );
$_i=0;
if ( $multislides->have_posts() ) :
echo $this->alanah_wrap;
echo '
';
echo $this->alanah_wrapper;
while ( $multislides->have_posts( )) : $multislides->the_post();
$_i++;
echo '
';
set_query_var( 'alanah_slide_cols', $cols );
get_template_part( 'html/loop', 'post' );
echo '
';
endwhile;
echo $this->close_wrapper;
get_template_part( 'html/alanah', 'navigation' );
echo $this->close_wrap;
ALANAH_HANDLERS::carousel_based_jq( $boxid, $cols, $scroll, $auto, $direction );
endif;
wp_reset_query();
} //alanah_wc_product_carousel
/**
* Alanah Posts Grid callback
*/
public function alanah_wc_post_grid( $args, $title, $column, $ID, $class ) {
//random box class
$randomClass = $this->alanah_random_string( 8 );
$box_class = $randomClass.' '.$class.' col-'.$column;
$this->alanah_wrap = '
';
$this->alanah_wrapper = '
';
$this->section_title = ( $title ) ? $title : __( 'Latest Posts', 'alanah-free' );
$alanah_posts = new WP_Query( $args );
$_i = 0;
if ( $alanah_posts->have_posts() ) :
echo $this->alanah_wrap;
echo '
' . $this->section_title . '
';
echo '
';
echo $this->alanah_wrapper;
while ( $alanah_posts->have_posts() ) : $alanah_posts->the_post();
$_i++;
$last = ( $_i % $column == 0 ) ? 'last' : '';
echo '
';
set_query_var( 'alanah_slide_cols', $column );
get_template_part( 'html/loop', 'post' );
echo '
';
endwhile;
echo $this->close_wrapper;
echo $this->close_wrap;
endif;
wp_reset_query();
}
/**
* woo product categories array
*/
public function alanah_wc_categories() {
$cat_args = array(
'orderby' => 'name',
'order' => 'ASC',
'hide_empty' => true,
);
return get_terms( 'product_cat', $cat_args );
}
/**
* Load google fonts in site
*/
public function alanah_load_google_fonts( $head, $body, $menu ) {
if( $head )
echo '
';
if( $body && ( $body !== $head ) )
echo '
';
if( $menu && ( $menu !== $head ) && ( $menu !== $body ) )
echo '
';
}
} //Class ALANAH_CORE_FUNCTIONS
endif;
?>