auth
1 year ago
block-notices
1 year ago
brands
1 year ago
cart
1 year ago
checkout
1 year ago
emails
11 months ago
global
1 year ago
loop
1 year ago
myaccount
1 year ago
notices
2 years ago
order
1 year ago
parts
1 year ago
product-form
1 year ago
single-product
1 year ago
templates
1 year ago
archive-product.php
2 years ago
content-product-cat.php
2 years ago
content-product.php
1 year ago
content-single-product.php
2 years ago
content-widget-price-filter.php
2 years ago
content-widget-product.php
2 years ago
content-widget-reviews.php
2 years ago
product-searchform.php
2 years ago
single-product-reviews.php
1 year ago
single-product.php
2 years ago
taxonomy-product-attribute.php
2 years ago
taxonomy-product-cat.php
2 years ago
taxonomy-product-tag.php
2 years ago
single-product.php
63 lines
| 1 | <?php |
| 2 | /** |
| 3 | * The Template for displaying all single products |
| 4 | * |
| 5 | * This template can be overridden by copying it to yourtheme/woocommerce/single-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://woocommerce.com/document/template-structure/ |
| 14 | * @package WooCommerce\Templates |
| 15 | * @version 1.6.4 |
| 16 | */ |
| 17 | |
| 18 | if ( ! defined( 'ABSPATH' ) ) { |
| 19 | exit; // Exit if accessed directly |
| 20 | } |
| 21 | |
| 22 | get_header( 'shop' ); ?> |
| 23 | |
| 24 | <?php |
| 25 | /** |
| 26 | * woocommerce_before_main_content hook. |
| 27 | * |
| 28 | * @hooked woocommerce_output_content_wrapper - 10 (outputs opening divs for the content) |
| 29 | * @hooked woocommerce_breadcrumb - 20 |
| 30 | */ |
| 31 | do_action( 'woocommerce_before_main_content' ); |
| 32 | ?> |
| 33 | |
| 34 | <?php while ( have_posts() ) : ?> |
| 35 | <?php the_post(); ?> |
| 36 | |
| 37 | <?php wc_get_template_part( 'content', 'single-product' ); ?> |
| 38 | |
| 39 | <?php endwhile; // end of the loop. ?> |
| 40 | |
| 41 | <?php |
| 42 | /** |
| 43 | * woocommerce_after_main_content hook. |
| 44 | * |
| 45 | * @hooked woocommerce_output_content_wrapper_end - 10 (outputs closing divs for the content) |
| 46 | */ |
| 47 | do_action( 'woocommerce_after_main_content' ); |
| 48 | ?> |
| 49 | |
| 50 | <?php |
| 51 | /** |
| 52 | * woocommerce_sidebar hook. |
| 53 | * |
| 54 | * @hooked woocommerce_get_sidebar - 10 |
| 55 | */ |
| 56 | do_action( 'woocommerce_sidebar' ); |
| 57 | ?> |
| 58 | |
| 59 | <?php |
| 60 | get_footer( 'shop' ); |
| 61 | |
| 62 | /* Omit closing PHP tag at the end of PHP files to avoid "headers already sent" issues. */ |
| 63 |