woocommerce/templates/loop-shop.php

46 lines
1.0 KiB
PHP

<?php
/**
* Loop-shop (deprecated)
*
* Outputs a product loop
*
* @author WooThemes
* @package WooCommerce/Templates
* @version 1.6.4
* @deprecated 1.6
*/
if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
_deprecated_file( basename(__FILE__), '1.6' );
?>
<?php if ( have_posts() ) : ?>
<?php do_action('woocommerce_before_shop_loop'); ?>
<?php woocommerce_product_loop_start(); ?>
<?php woocommerce_product_subcategories(); ?>
<?php while ( have_posts() ) : the_post(); ?>
<?php woocommerce_get_template_part( 'content', 'product' ); ?>
<?php endwhile; // end of the loop. ?>
<?php woocommerce_product_loop_end(); ?>
<?php do_action('woocommerce_after_shop_loop'); ?>
<?php else : ?>
<?php if ( ! woocommerce_product_subcategories( array( 'before' => woocommerce_product_loop_start( false ), 'after' => woocommerce_product_loop_end( false ) ) ) ) : ?>
<p><?php _e( 'No products found which match your selection.', 'woocommerce' ); ?></p>
<?php endif; ?>
<?php endif; ?>
<div class="clear"></div>