Advertisement
alchymyth

relia /woocommerce/archive-product.php edited

Feb 28th, 2020
744
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 3.34 KB | None | 0 0
  1. <?php
  2. /**
  3.  * The Template for displaying product archives, including the main shop page which is a post type archive
  4.  *
  5.  * This template can be overridden by copying it to yourtheme/woocommerce/archive-product.php.
  6.  *
  7.  * HOWEVER, on occasion WooCommerce will need to update template files and you
  8.  * (the theme developer) will need to copy the new files to your theme to
  9.  * maintain compatibility. We try to do this as little as possible, but it does
  10.  * happen. When this occurs the version of the template file will be bumped and
  11.  * the readme will list any important changes.
  12.  *
  13.  * @see https://docs.woocommerce.com/document/template-structure/
  14.  * @package WooCommerce/Templates
  15.  * @version 3.4.0
  16.  */
  17.  
  18. defined( 'ABSPATH' ) || exit;
  19.  
  20. get_header( 'shop' ); ?>
  21.  
  22.     <div class="container">
  23.    
  24.         <div class="row">
  25.            
  26.             <?php if ( get_theme_mod( 'relia_shop_sidebar_location', 'right' ) == 'left' ) : ?>
  27.                 <?php get_sidebar( 'shop' ); ?>
  28.             <?php endif; ?>
  29.  
  30.             <div class="col-sm-<?php echo relia_shop_width(); ?> relia-shop-body">
  31.  
  32. <?php      
  33. /**
  34.  * Hook: woocommerce_before_main_content.
  35.  *
  36.  * @hooked woocommerce_output_content_wrapper - 10 (outputs opening divs for the content)
  37.  * @hooked woocommerce_breadcrumb - 20
  38.  * @hooked WC_Structured_Data::generate_website_data() - 30
  39.  */
  40. do_action( 'woocommerce_before_main_content' );
  41.  
  42. ?>
  43. <header class="woocommerce-products-header">
  44.     <?php if ( apply_filters( 'woocommerce_show_page_title', true ) ) : ?>
  45.         <h1 class="woocommerce-products-header__title page-title"><?php woocommerce_page_title(); ?></h1>
  46.     <?php endif; ?>
  47.  
  48.     <?php
  49.     /**
  50.      * Hook: woocommerce_archive_description.
  51.      *
  52.      * @hooked woocommerce_taxonomy_archive_description - 10
  53.      * @hooked woocommerce_product_archive_description - 10
  54.      */
  55.     do_action( 'woocommerce_archive_description' );
  56.     ?>
  57. </header>
  58. <?php
  59. if ( woocommerce_product_loop() ) {
  60.  
  61.     /**
  62.      * Hook: woocommerce_before_shop_loop.
  63.      *
  64.      * @hooked woocommerce_output_all_notices - 10
  65.      * @hooked woocommerce_result_count - 20
  66.      * @hooked woocommerce_catalog_ordering - 30
  67.      */
  68.     do_action( 'woocommerce_before_shop_loop' );
  69.  
  70.     woocommerce_product_loop_start();
  71.  
  72.     if ( wc_get_loop_prop( 'total' ) ) {
  73.         while ( have_posts() ) {
  74.             the_post();
  75.  
  76.             /**
  77.              * Hook: woocommerce_shop_loop.
  78.              */
  79.             do_action( 'woocommerce_shop_loop' );
  80.  
  81.             wc_get_template_part( 'content', 'product' );
  82.         }
  83.     }
  84.  
  85.     woocommerce_product_loop_end();
  86.  
  87.     /**
  88.      * Hook: woocommerce_after_shop_loop.
  89.      *
  90.      * @hooked woocommerce_pagination - 10
  91.      */
  92.     do_action( 'woocommerce_after_shop_loop' );
  93. } else {
  94.     /**
  95.      * Hook: woocommerce_no_products_found.
  96.      *
  97.      * @hooked wc_no_products_found - 10
  98.      */
  99.     do_action( 'woocommerce_no_products_found' );
  100. }
  101.  
  102. /**
  103.  * Hook: woocommerce_after_main_content.
  104.  *
  105.  * @hooked woocommerce_output_content_wrapper_end - 10 (outputs closing divs for the content)
  106.  */
  107. do_action( 'woocommerce_after_main_content' );
  108.  
  109. /**
  110.  * Hook: woocommerce_sidebar.
  111.  *
  112.  * @hooked woocommerce_get_sidebar - 10
  113.  */
  114. //do_action( 'woocommerce_sidebar' );
  115. ?>
  116.  
  117. </div>
  118.                
  119.         <?php if ( get_theme_mod( 'relia_shop_sidebar_location', 'right' ) == 'right' ) : ?>
  120.             <?php get_sidebar( 'shop' ); ?>
  121.         <?php endif; ?>
  122.  
  123.     </div>
  124.  
  125. </div>
  126.  
  127. <?php get_footer( 'shop' );
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement