Aucune description

single-product.php 1.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  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://docs.woocommerce.com/document/template-structure/
  14. * @package WooCommerce\Templates
  15. * @version 1.6.4
  16. */
  17. if ( ! defined( 'ABSPATH' ) ) {
  18. exit; // Exit if accessed directly
  19. }
  20. get_header( 'shop' ); ?>
  21. <?php
  22. /**
  23. * woocommerce_before_main_content hook.
  24. *
  25. * @hooked woocommerce_output_content_wrapper - 10 (outputs opening divs for the content)
  26. * @hooked woocommerce_breadcrumb - 20
  27. */
  28. do_action( 'woocommerce_before_main_content' );
  29. ?>
  30. <?php while ( have_posts() ) : ?>
  31. <?php the_post(); ?>
  32. <?php wc_get_template_part( 'content', 'single-product' ); ?>
  33. <?php endwhile; // end of the loop. ?>
  34. <?php
  35. /**
  36. * woocommerce_after_main_content hook.
  37. *
  38. * @hooked woocommerce_output_content_wrapper_end - 10 (outputs closing divs for the content)
  39. */
  40. do_action( 'woocommerce_after_main_content' );
  41. ?>
  42. <?php
  43. /**
  44. * woocommerce_sidebar hook.
  45. *
  46. * @hooked woocommerce_get_sidebar - 10
  47. */
  48. do_action( 'woocommerce_sidebar' );
  49. ?>
  50. <?php
  51. get_footer( 'shop' );
  52. /* Omit closing PHP tag at the end of PHP files to avoid "headers already sent" issues. */