3, 'columns' => 3, ); $args = wp_parse_args( $defaults, $args ); return $args; } add_filter( 'woocommerce_output_related_products_args', 'vmagazine_lite_woocommerce_related_products_args' ); if ( ! function_exists( 'vmagazine_lite_woocommerce_product_columns_wrapper' ) ) { /** * Product columns wrapper. * * @return void */ function vmagazine_lite_woocommerce_product_columns_wrapper() { $columns = vmagazine_lite_woocommerce_loop_columns(); echo '
'; } } add_action( 'woocommerce_before_shop_loop', 'vmagazine_lite_woocommerce_product_columns_wrapper', 40 ); if ( ! function_exists( 'vmagazine_lite_woocommerce_product_columns_wrapper_close' ) ) { /** * Product columns wrapper close. * * @return void */ function vmagazine_lite_woocommerce_product_columns_wrapper_close() { echo '
'; } } add_action( 'woocommerce_after_shop_loop', 'vmagazine_lite_woocommerce_product_columns_wrapper_close', 40 ); /** * Remove default WooCommerce wrapper. */ remove_action( 'woocommerce_before_main_content', 'woocommerce_output_content_wrapper', 10 ); remove_action( 'woocommerce_after_main_content', 'woocommerce_output_content_wrapper_end', 10 ); if ( ! function_exists( 'vmagazine_lite_woocommerce_wrapper_before' ) ) { /** * Before Content. * * Wraps all WooCommerce content in wrappers which match the theme markup. * * @return void */ function vmagazine_lite_woocommerce_wrapper_before() { $sidebar_class = ''; if( is_active_sidebar( 'shop-right' ) ){ $sidebar_class = 'sidebar-shop'; } ?>
cart->get_cart_contents_count()); ?> cart->get_cart_contents_count() )?>
  • cart->get_cart_contents_count() != 0 ) { ?>
  • '', ); the_widget( 'WC_Widget_Cart', $instance ); ?>
esc_html__( 'Shop Sidebar', 'vmagazine-lite' ), 'id' => 'shop-right', 'description' => esc_html__( 'Add widgets here to show on shop page.', 'vmagazine-lite' ), 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); } }add_action( 'widgets_init', 'vmagazine_lite_shop_sidebar_area' ); remove_action('woocommerce_before_shop_loop_item','woocommerce_template_loop_product_link_open',10 ); function vmagazine_lite_product_img_wrapper(){ echo '
'; woocommerce_template_loop_product_link_open(); } add_action('woocommerce_before_shop_loop_item','vmagazine_lite_product_img_wrapper', 10 ); remove_action('woocommerce_after_shop_loop_item','woocommerce_template_loop_product_link_close',5); remove_action('woocommerce_template_loop_product_title','woocommerce_template_loop_product_thumbnail',10); function vmagazine_lite_product_wrap(){ woocommerce_template_loop_product_thumbnail(); woocommerce_template_loop_product_link_close(); } add_action('woocommerce_template_loop_product_title','vmagazine_lite_product_wrap',10); /** * Remove woocommerce arhive title */ add_filter( 'woocommerce_show_page_title', 'vmagazine_lite_shop_title' ); function vmagazine_lite_shop_title(){ return false; } remove_action('woocommerce_after_shop_loop_item','woocommerce_template_loop_add_to_cart',10); function vmagazine_lite_cart_move(){ woocommerce_template_loop_add_to_cart(); echo '
'; } add_action('woocommerce_before_shop_loop_item_title','vmagazine_lite_cart_move',10); remove_action('woocommerce_shop_loop_item_title','woocommerce_template_loop_product_title',10); function vmagazine_lite_product_title_link(){ woocommerce_template_loop_product_link_open(); woocommerce_template_loop_product_title(); woocommerce_template_loop_product_link_close(); } add_action('woocommerce_shop_loop_item_title','vmagazine_lite_product_title_link',10); remove_action( 'woocommerce_before_shop_loop', 'woocommerce_result_count', 20 ); remove_action('woocommerce_archive_description','woocommerce_product_archive_description', 10 ); remove_action( 'woocommerce_before_shop_loop', 'woocommerce_catalog_ordering', 30 ); function vmagazine_lite_archive_sorting(){ woocommerce_result_count(); woocommerce_catalog_ordering(); } add_action('woocommerce_archive_description','vmagazine_lite_archive_sorting',10);