Advertisement
majeedraza

WooCommerce - Move product excerpt below the image

Mar 3rd, 2021 (edited)
972
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.88 KB | None | 0 0
  1. ?php
  2.   // WooCommerce - Move product excerpt below the image
  3.   remove_action( 'woocommerce_single_product_summary', 'woocommerce_template_single_excerpt', 20 );
  4.   add_action( 'woocommerce_before_single_product_summary', 'start_left_side', 5 );
  5.   function start_left_side() {
  6.     print '<div class="left_side">'.PHP_EOL;
  7.   }
  8.   add_action( 'woocommerce_before_single_product_summary', 'woocommerce_template_single_excerpt', 30 );
  9.   add_action( 'woocommerce_before_single_product_summary', 'end_left_side', 40 );
  10.   function end_left_side() {
  11.     print '<div class="clear"></div>'.PHP_EOL;
  12.     print '</div>'.PHP_EOL;
  13.   }
  14. ?>
  15. <style>
  16. .left_side {
  17.   float: left;
  18.   width: 40%;
  19. }
  20. .single-product div.product .woocommerce-product-gallery {
  21.   width: 100% !important;
  22. }
  23. .woocommerce-product-details__short-description {
  24.   clear: both;
  25.   float: left;
  26. }
  27. .clear {
  28.   clear: both;
  29. }
  30. </style>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement