';
}
}
add_action( 'acommerce_before_mainsec', 'acommerce_before_main_wrapper_main_sec' );
/**
* aCommerce before the main content
*
* @since 1.0.0
* @param int $post_id get the post id
*
* @return string
*/
if ( ! function_exists( 'acommerce_before_main_wrapper_sec' ) ) {
/**
* aCommerce Sidebar layout
*
* @since 1.0.0
* @return void
*/
function acommerce_before_main_wrapper_sec() {
echo '
';
}
}
add_action( 'acommerce_after_mainsec', 'acommerce_before_main_wrapper_sec' );
/**
* Sidebar functions
*
* @since 1.0.0
* @return string
*/
if( ! function_exists( 'acommerce_page_layout' ) ) {
function acommerce_page_layout(){
/**
* get the value form customizer
*
* @since 1.0.0
* @return string
*/
return acommerce_get_sidebar_layout();
}
}
//Woocommerce Activation
function acommerce_is_woocommerce_activated() {
return class_exists( 'woocommerce' ) ? true : false;
}
// return all sidebars
if (!function_exists('acommerce_get_all_sidebar')) {
function acommerce_get_all_sidebar() {
global $acommerce_wp_registered_sidebars;
$out = array('' => '' );
if ( empty( $acommerce_wp_registered_sidebars ) )
return;
foreach ( $acommerce_wp_registered_sidebars as $acommerce_sidebar_id => $acommerce_sidebar) :
$out[$acommerce_sidebar_id] = $acommerce_sidebar['name'];
endforeach;
return $out;
}
}
/**
* Header Search Section
*/
if ( ! function_exists( 'acommerce_header_search_section' ) ) {
/**
* Header Search Section
*
* @since 1.0.0
* @return void
*/
function acommerce_header_search_section(){
/*
* Include the Post-Format-specific template for the content.
* If you want to override this in a child theme, then include a file
* called content-___.php (where ___ is the Post Format name) and that will be used instead.
*/
get_template_part( 'spiderbuzz/template-parts/header/header-search' );
}
}
add_action( 'acommerce_header_search', 'acommerce_header_search_section' );
/**
* Header Search Section
*/
if ( ! function_exists( 'acommerce_header_category_list' ) ) {
/**
* Header Search Section
*
* @since 1.0.0
* @return void
*/
function acommerce_header_category_list(){
$acommerce_taxonomy = 'product_cat';
$acommerce_orderby = 'name';
$acommerce_show_count = 0; // 1 for yes, 0 for no
$acommerce_pad_counts = 0; // 1 for yes, 0 for no
$acommerce_hierarchical = 1; // 1 for yes, 0 for no
$acommerce_title = '';
$acommerce_empty = 0;
$acommerce_args = array(
'taxonomy' => $acommerce_taxonomy,
'orderby' => $acommerce_orderby,
'show_count' => $acommerce_show_count,
'pad_counts' => $acommerce_pad_counts,
'hierarchical' => $acommerce_hierarchical,
'title_li' => $acommerce_title,
'hide_empty' => $acommerce_empty
);
$acommerce_all_categories = get_categories( $acommerce_args );
echo '