ID, 'bizmax_common_meta', true ) ) { $common_meta = get_post_meta( $post->ID, 'bizmax_common_meta', true ); } else { $common_meta = array(); } if ( array_key_exists( 'enable_banner', $common_meta ) ) { $product_banner = $common_meta['enable_banner']; } else { $product_banner = true; } if ( array_key_exists( 'hide_banner_title_meta', $common_meta ) && $common_meta['hide_banner_title_meta'] != 'default' ) { $hide_product_title = $common_meta['hide_banner_title_meta']; } else { $hide_product_title = bizmax_option( 'hide_banner_title', 'no' ); } if ( array_key_exists( 'custom_title', $common_meta ) ) { $custom_title = $common_meta['custom_title']; } else { $custom_title = ''; } if ( array_key_exists( 'hide_banner_breadcrumb_meta', $common_meta ) && $common_meta['hide_banner_breadcrumb_meta'] != 'default' ) { $hide_product_breadcrumb = $common_meta['hide_banner_breadcrumb_meta']; } else { $hide_product_breadcrumb = bizmax_option( 'hide_banner_breadcrumb', 'no' ); } if ( array_key_exists( 'banner_text_align_meta', $common_meta ) && $common_meta['banner_text_align_meta'] != 'default' ) { $banner_text_align = $common_meta['banner_text_align_meta']; } else { $banner_text_align = bizmax_option( 'banner_default_text_align', 'left' ); } } ?>
ID, 'bizmax_common_meta', true ) ) { $common_meta = get_post_meta( $post->ID, 'bizmax_common_meta', true ); } else { $common_meta = array(); } if (is_shop()) { $layout = bizmax_option('shop_page_layout', 'full-width'); $selected_sidebar = bizmax_option( 'shop_default_sidebar', 'bizmax-shop-sidebar' ); } else { if ( array_key_exists( 'layout_meta', $common_meta ) && $common_meta['layout_meta'] != 'default' ) { $layout = $common_meta['layout_meta']; } else { $layout = bizmax_option( 'product_page_layout', 'right-sidebar' ); } if ( array_key_exists( 'sidebar_meta', $common_meta ) && $common_meta['sidebar_meta'] != '0' ) { $selected_sidebar = $common_meta['sidebar_meta']; } else { $selected_sidebar = bizmax_option( 'product_default_sidebar', 'bizmax-shop-sidebar' ); } } ?>
'; } } add_action('woocommerce_before_shop_loop', 'bizmax_woocommerce_product_columns_wrapper', 40); /** * Before Product columns wrapper after. * * woocommerce_after_shop_loop */ if (!function_exists('bizmax_woocommerce_product_columns_wrapper_close')) { function bizmax_woocommerce_product_columns_wrapper_close() { echo ''; } } add_action('woocommerce_after_shop_loop', 'bizmax_woocommerce_product_columns_wrapper_close', 40); /** * Related Products Args. */ function bizmax_woocommerce_related_products_args($args) { $defaults = array( 'posts_per_page' => 100, 'columns' => 1, ); $args = wp_parse_args($defaults, $args); return $args; } add_filter('woocommerce_output_related_products_args', 'bizmax_woocommerce_related_products_args'); /** * Product gallery thumnbail columns. */ function bizmax_woocommerce_thumbnail_columns() { return 4; } add_filter('woocommerce_product_thumbnails_columns', 'bizmax_woocommerce_thumbnail_columns'); /** * Header Mini Cart */ function bizmax_header_cart_count_number( $fragments ) { global $woocommerce; ob_start();?> cart->get_cart_contents_count();?> post_excerpt) { return false; } echo '
'; if (!$post->post_excerpt) { echo wp_trim_words(get_the_excerpt() , '30', '...' ); } else { wc_get_template('single-product/short-description.php'); } echo '
'; } } /** * Add Short Description on shop page product */ function bizmax_woocommerce_shop_add_description() { if (is_shop() || is_product_category() || is_product_tag()) { global $post; echo '
'; echo wp_trim_words(get_the_excerpt() , '30', '...' ); echo '
'; } } /** * Product Loop */ add_filter( 'woocommerce_after_shop_loop_item', 'bizmax_woo_product' ); function bizmax_woo_product() { global $product; $quick_view = bizmax_option('product_quick_view', true); $wish_list = bizmax_option('product_wish_list', true); ?>

'; $args['next_text'] = ''; return $args; } add_filter('woocommerce_pagination_args', 'bizmax_woocommerce_pagination'); /* * Break points */ function bizmax_woocommerce_smallscreen_breakpoint(){ return '767px'; } add_filter( 'woocommerce_style_smallscreen_breakpoint', 'bizmax_woocommerce_smallscreen_breakpoint' ); /* * Remove Default Product Meta */ remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_meta', 40 ); $show_sku = bizmax_option('product_sku', true); if($show_sku == true){ add_action( 'woocommerce_single_product_summary', 'bizmax_show_sku_single_product', 40 ); function bizmax_show_sku_single_product() { global $product; ?>
get_sku() || $product->is_type( 'variable' ) ) ) : ?> get_sku() ) ? $sku : esc_html__( 'N/A', 'bizmax' ); ?>
get_id(), ', ', '' . _n( 'Category:', 'Categories:', count( $product->get_category_ids() ), 'bizmax' ) . ' ', '' ); ?>
get_id(), ', ', '' . _n( 'Tag:', 'Tags:', count( $product->get_tag_ids() ), 'bizmax' ) . ' ', '' ); ?>