-
Notifications
You must be signed in to change notification settings - Fork 10.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7ac85e9
commit c846906
Showing
10 changed files
with
273 additions
and
121 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,64 +1,63 @@ | ||
<?php | ||
/** | ||
* The template for displaying content in the single-product.php template | ||
* The template for displaying product content within loops. | ||
* | ||
* Override this template by copying it to yourtheme/woocommerce/content-product.php | ||
* | ||
* @package WooCommerce | ||
* @since WooCommerce 1.6 | ||
* @todo prepend class names with wc- | ||
*/ | ||
?> | ||
|
||
<?php | ||
/** | ||
* woocommerce_before_single_product hook | ||
* | ||
* @hooked woocommerce_show_messages - 10 | ||
*/ | ||
do_action( 'woocommerce_before_single_product' ); | ||
?> | ||
|
||
global $product, $woocommerce_loop; | ||
|
||
<div itemscope itemtype="http://schema.org/Product" id="product-<?php the_ID(); ?>" <?php post_class(); ?>> | ||
// Store loop count we're currently on | ||
if ( empty( $woocommerce_loop['loop'] ) ) | ||
$woocommerce_loop['loop'] = 0; | ||
|
||
<?php | ||
/** | ||
* woocommerce_show_product_images hook | ||
* | ||
* @hooked woocommerce_show_product_sale_flash - 10 | ||
* @hooked woocommerce_show_product_images - 20 | ||
*/ | ||
do_action( 'woocommerce_before_single_product_summary' ); | ||
?> | ||
// Store column count for displaying the grid | ||
if ( empty( $woocommerce_loop['columns'] ) ) | ||
$woocommerce_loop['columns'] = apply_filters( 'loop_shop_columns', 4 ); | ||
|
||
<div class="summary"> | ||
// Ensure visibilty | ||
if ( ! $product->is_visible() ) return; | ||
|
||
<?php | ||
/** | ||
* woocommerce_single_product_summary hook | ||
// Increase loop count | ||
$woocommerce_loop['loop']++; | ||
?> | ||
<li class="product <?php | ||
if ( $woocommerce_loop['loop'] % $woocommerce_loop['columns'] == 0 ) | ||
echo 'last'; | ||
elseif ( ( $woocommerce_loop['loop'] - 1 ) % $woocommerce_loop['columns'] == 0 ) | ||
echo 'first'; | ||
?>"> | ||
|
||
<?php do_action( 'woocommerce_before_shop_loop_item' ); ?> | ||
|
||
<a href="<?php the_permalink(); ?>"> | ||
|
||
<?php | ||
/** | ||
* woocommerce_before_shop_loop_item_title hook | ||
* | ||
* @hooked woocommerce_template_single_title - 5 | ||
* @hooked woocommerce_template_single_price - 10 | ||
* @hooked woocommerce_template_single_excerpt - 20 | ||
* @hooked woocommerce_template_single_add_to_cart - 30 | ||
* @hooked woocommerce_template_single_meta - 40 | ||
* @hooked woocommerce_template_single_sharing - 50 | ||
*/ | ||
do_action( 'woocommerce_single_product_summary' ); | ||
* @hooked woocommerce_show_product_loop_sale_flash - 10 | ||
* @hooked woocommerce_template_loop_product_thumbnail - 10 | ||
*/ | ||
do_action( 'woocommerce_before_shop_loop_item_title' ); | ||
?> | ||
|
||
<h3><?php the_title(); ?></h3> | ||
|
||
</div><!-- .summary --> | ||
|
||
<?php | ||
/** | ||
* woocommerce_after_single_product_summary hook | ||
* | ||
* @hooked woocommerce_output_product_data_tabs - 10 | ||
* @hooked woocommerce_output_related_products - 20 | ||
*/ | ||
do_action( 'woocommerce_after_single_product_summary' ); | ||
?> | ||
|
||
</div><!-- #product-<?php the_ID(); ?> --> | ||
|
||
<?php do_action( 'woocommerce_after_single_product' ); ?> | ||
<?php | ||
/** | ||
* woocommerce_after_shop_loop_item_title hook | ||
* | ||
* @hooked woocommerce_template_loop_price - 10 | ||
*/ | ||
do_action( 'woocommerce_after_shop_loop_item_title' ); | ||
?> | ||
|
||
</a> | ||
|
||
<?php do_action( 'woocommerce_after_shop_loop_item' ); ?> | ||
|
||
</li> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
<?php | ||
/** | ||
* The template for displaying product category thumbnails within loops. | ||
* | ||
* Override this template by copying it to yourtheme/woocommerce/content-product_cat.php | ||
* | ||
* @package WooCommerce | ||
* @since WooCommerce 1.6 | ||
*/ | ||
|
||
global $woocommerce_loop; | ||
|
||
// Store loop count we're currently on | ||
if ( empty( $woocommerce_loop['loop'] ) ) | ||
$woocommerce_loop['loop'] = 0; | ||
|
||
// Store column count for displaying the grid | ||
if ( empty( $woocommerce_loop['columns'] ) ) | ||
$woocommerce_loop['columns'] = apply_filters( 'loop_shop_columns', 4 ); | ||
|
||
// Increase loop count | ||
$woocommerce_loop['loop']++; | ||
?> | ||
<li class="product <?php | ||
if ( $woocommerce_loop['loop'] % $woocommerce_loop['columns'] == 0 ) | ||
echo 'last'; | ||
elseif ( ( $woocommerce_loop['loop'] - 1 ) % $woocommerce_loop['columns'] == 0 ) | ||
echo 'first'; | ||
?>"> | ||
|
||
<?php do_action( 'woocommerce_before_subcategory', $category ); ?> | ||
|
||
<a href="<?php echo get_term_link( $category->slug, 'product_cat' ); ?>"> | ||
|
||
<?php | ||
/** | ||
* woocommerce_before_subcategory_title hook | ||
* | ||
* @hooked woocommerce_subcategory_thumbnail - 10 | ||
*/ | ||
do_action( 'woocommerce_before_subcategory_title', $category ); | ||
?> | ||
|
||
<h3> | ||
<?php echo $category->name; ?> | ||
<?php if ( $category->count > 0 ) : ?> | ||
<mark class="count">(<?php echo $category->count; ?>)</mark> | ||
<?php endif; ?> | ||
</h3> | ||
|
||
<?php | ||
/** | ||
* woocommerce_after_subcategory_title hook | ||
*/ | ||
do_action( 'woocommerce_after_subcategory_title', $category ); | ||
?> | ||
|
||
</a> | ||
|
||
<?php do_action( 'woocommerce_after_subcategory', $category ); ?> | ||
|
||
</li> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
<?php | ||
/** | ||
* The template for displaying product content in the single-product.php template | ||
* | ||
* Override this template by copying it to yourtheme/woocommerce/content-single-product.php | ||
* | ||
* @package WooCommerce | ||
* @since WooCommerce 1.6 | ||
* @todo prepend class names with wc- | ||
*/ | ||
?> | ||
|
||
<?php | ||
/** | ||
* woocommerce_before_single_product hook | ||
* | ||
* @hooked woocommerce_show_messages - 10 | ||
*/ | ||
do_action( 'woocommerce_before_single_product' ); | ||
?> | ||
|
||
<div itemscope itemtype="http://schema.org/Product" id="product-<?php the_ID(); ?>" <?php post_class(); ?>> | ||
|
||
<?php | ||
/** | ||
* woocommerce_show_product_images hook | ||
* | ||
* @hooked woocommerce_show_product_sale_flash - 10 | ||
* @hooked woocommerce_show_product_images - 20 | ||
*/ | ||
do_action( 'woocommerce_before_single_product_summary' ); | ||
?> | ||
|
||
<div class="summary"> | ||
|
||
<?php | ||
/** | ||
* woocommerce_single_product_summary hook | ||
* | ||
* @hooked woocommerce_template_single_title - 5 | ||
* @hooked woocommerce_template_single_price - 10 | ||
* @hooked woocommerce_template_single_excerpt - 20 | ||
* @hooked woocommerce_template_single_add_to_cart - 30 | ||
* @hooked woocommerce_template_single_meta - 40 | ||
* @hooked woocommerce_template_single_sharing - 50 | ||
*/ | ||
do_action( 'woocommerce_single_product_summary' ); | ||
?> | ||
|
||
</div><!-- .summary --> | ||
|
||
<?php | ||
/** | ||
* woocommerce_after_single_product_summary hook | ||
* | ||
* @hooked woocommerce_output_product_data_tabs - 10 | ||
* @hooked woocommerce_output_related_products - 20 | ||
*/ | ||
do_action( 'woocommerce_after_single_product_summary' ); | ||
?> | ||
|
||
</div><!-- #product-<?php the_ID(); ?> --> | ||
|
||
<?php do_action( 'woocommerce_after_single_product' ); ?> |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.