'; } /** * After Product content * Closes the wrapping div and section * @since 1.0.0 * @return void */ if ( ! function_exists( 'shop_isle_product_page_wrapper_end' ) ) { function shop_isle_product_page_wrapper_end() { ?>
4, 'columns' => 4, ) ); return $args; } /** * Product gallery thumnail columns * @return integer number of columns * @since 1.0.0 */ function shop_isle_thumbnail_columns() { return intval( apply_filters( 'shop_isle_product_thumbnail_columns', 4 ) ); } /** * Products per page * @return integer number of products * @since 1.0.0 */ function shop_isle_products_per_page() { return intval( apply_filters( 'shop_isle_products_per_page', 12 ) ); } /** * Query WooCommerce Extension Activation. * @var $extension main extension class name * @return boolean */ function is_woocommerce_extension_activated( $extension = 'WC_Bookings' ) { return class_exists( $extension ) ? true : false; } /** * Header for shop page * @since 1.0.0 */ function shop_isle_header_shop_page( $page_title ) { $shop_isle_title = ''; $shop_isle_header_image = get_header_image(); if( !empty($shop_isle_header_image) ): $shop_isle_title = '
'; else: $shop_isle_title = '
'; endif; $shop_isle_title .= '
'; $shop_isle_title .= '
'; $shop_isle_title .= '
'; if( !empty($page_title) ): $shop_isle_title .= '

'.$page_title.'

'; endif; $shop_isle_title .= '
'; $shop_isle_title .= '
'; $shop_isle_title .= '
'; $shop_isle_title .= '
'; return $shop_isle_title; } /** * New thumbnail size for cart page * @since 1.0.0 */ function shop_isle_cart_item_thumbnail( $thumb, $cart_item, $cart_item_key ) { $product = get_product( $cart_item['product_id'] ); return $product->get_image( 'shop_isle_cart_item_image_size' ); } /** * Products slider on single page product * @since 1.0.0 */ function shop_isle_products_slider_on_single_page() { $shop_isle_products_slider_single_hide = get_theme_mod('shop_isle_products_slider_single_hide'); if( isset($shop_isle_products_slider_single_hide) && $shop_isle_products_slider_single_hide != 1 ): echo '
'; echo '
'; elseif ( is_customize_preview() ): echo '
'; echo '
'; endif; if( ( isset($shop_isle_products_slider_single_hide) && $shop_isle_products_slider_single_hide != 1 ) || is_customize_preview() ): echo '
'; $shop_isle_products_slider_title = get_theme_mod('shop_isle_products_slider_title',__( 'Exclusive products', 'shop-isle' )); $shop_isle_products_slider_subtitle = get_theme_mod('shop_isle_products_slider_subtitle',__( 'Special category of products', 'shop-isle' )); if( !empty($shop_isle_products_slider_title) || !empty($shop_isle_products_slider_subtitle) ): echo '
'; echo '
'; if( !empty($shop_isle_products_slider_title) ): echo '

'.$shop_isle_products_slider_title.'

'; endif; if( !empty($shop_isle_products_slider_subtitle) ): echo '
'.$shop_isle_products_slider_subtitle.'
'; endif; echo '
'; echo '
'; endif; $shop_isle_products_slider_category = get_theme_mod('shop_isle_products_slider_category'); if( !empty($shop_isle_products_slider_category) && ($shop_isle_products_slider_category != '-') ): $shop_isle_products_slider_args = array( 'post_type' => 'product', 'posts_per_page' => 10, 'tax_query' => array( array( 'taxonomy' => 'product_cat', 'field' => 'term_id', 'terms' => $shop_isle_products_slider_category, ) )); $shop_isle_products_slider_loop = new WP_Query( $shop_isle_products_slider_args ); if( $shop_isle_products_slider_loop->have_posts() ): echo '
'; echo ''; echo '
'; endif; else: $shop_isle_products_slider_args = array( 'post_type' => 'product', 'posts_per_page' => 10); $shop_isle_products_slider_loop = new WP_Query( $shop_isle_products_slider_args ); if( $shop_isle_products_slider_loop->have_posts() ): echo '
'; echo ''; echo '
'; endif; endif; echo '
'; echo '
'; endif; } if ( !function_exists( 'shop_isle_search_products_no_results_wrapper' ) ) { function shop_isle_search_products_no_results_wrapper() { $shop_isle_body_classes = get_body_class(); if( is_search() && in_array('woocommerce',$shop_isle_body_classes) && in_array('search-no-results',$shop_isle_body_classes) ) { echo '
'; echo '
'; } } } if ( !function_exists( 'shop_isle_search_products_no_results_wrapper_end' ) ) { function shop_isle_search_products_no_results_wrapper_end() { $shop_isle_body_classes = get_body_class(); if( is_search() && in_array('woocommerce',$shop_isle_body_classes) && in_array('search-no-results',$shop_isle_body_classes) ) { echo '
'; echo '
'; } } } /* Display WooCommerce product category description on all category archive pages */ if ( !function_exists( 'shop_isle_woocommerce_taxonomy_archive_description' ) ) { function shop_isle_woocommerce_taxonomy_archive_description() { if ( is_tax( array( 'product_cat', 'product_tag' ) ) && get_query_var( 'paged' ) != 0 ) { $description = wc_format_content( term_description() ); if ( $description ) { echo '
' . $description . '
'; } } } } add_action( 'woocommerce_archive_description', 'shop_isle_woocommerce_taxonomy_archive_description'); /* Display WooCommerce shop content on all shop pages */ if ( !function_exists( 'shop_isle_woocommerce_product_archive_description' ) ) { function shop_isle_woocommerce_product_archive_description() { if ( is_post_type_archive( 'product' ) ) { $shop_page = get_post( wc_get_page_id( 'shop' ) ); if ( $shop_page ) { $description = wc_format_content( $shop_page->post_content ); if ( $description ) { echo '
' . $description . '
'; } } } } } /* Fix for Shop page set up as static frontpage problem with the sidebar */ function shop_isle_woocommerce_breadcrumb() { if (function_exists('woocommerce_breadcrumb')) { if (is_front_page()) { echo ''; } else { woocommerce_breadcrumb(); } } }