'product' ) ); if ( $new_pages->post_count > 0 ){ $pages = array_merge( $pages, $new_pages->posts ); } wp_reset_query(); return $pages; } // Add wrappers function quick_sales_add_attributes() { get_template_part('woocommerce/add_custom_attributes'); } function quick_sales_add_product_info_wrapper() { echo '
'; } function quick_sales_add_product_info_inner_wrapper() { echo '
'; } function quick_sales_close_product_info() { echo '
'; } //Remove breadcrumbs add_action( 'init', 'quick_sales_remove_wc_breadcrumbs' ); function quick_sales_remove_wc_breadcrumbs() { remove_action( 'woocommerce_before_main_content', 'woocommerce_breadcrumb', 20, 0 ); } // Register sidebars that will be displayed on product list add_action( 'widgets_init', 'quick_sales_add_woocommerce_sidebars' ); function quick_sales_add_woocommerce_sidebars() { register_sidebar( array( 'name' => __( 'Sidebar before product archive', 'quick-sales' ) . ' 1', 'id' => 'sidebar-before-archive-1', 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => __( 'Sidebar before product archive', 'quick-sales' ) . ' 2', 'id' => 'sidebar-before-archive-2', 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => __( 'Sidebar before product archive', 'quick-sales' ) . ' 3', 'id' => 'sidebar-before-archive-3', 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => __( 'Sidebar after product archive', 'quick-sales' ) . ' 1', 'id' => 'sidebar-after-archive-1', 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => __( 'Sidebar after product archive', 'quick-sales' ) . ' 2', 'id' => 'sidebar-after-archive-2', 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); register_sidebar( array( 'name' => __( 'Sidebar after product archive', 'quick-sales' ) . ' 3', 'id' => 'sidebar-after-archive-3', 'before_widget' => '
', 'after_widget' => '
', 'before_title' => '

', 'after_title' => '

', ) ); } //Add sidebars add_action( 'woocommerce_before_shop_loop', 'quick_sales_add_archive_widgets_before_loop', 11 ); function quick_sales_add_archive_widgets_before_loop() { get_sidebar('before-product-list'); } add_action( 'woocommerce_after_shop_loop', 'quick_sales_add_archive_widgets_after_loop', 60 ); function quick_sales_add_archive_widgets_after_loop() { get_sidebar('after-product-list'); } //Add notice about plugin add_action( 'admin_notices', 'quick_sales_one_page_info' ); function quick_sales_one_page_info() { if( class_exists('woocommerce_one_page_shopping') ) { //Hide info about theme from one page shopping plugin update_option( 'woocommerce_one_page_shopping_notice_get_theme', false ); return; } if( isset( $_GET['quick_sales_hide_notice'] ) ){ update_option('quick_sales_hide_notice', true ); return; } if( get_option('quick_sales_hide_notice') == true ) { return; } ?>

|