Advertisement
Guest User

Untitled

a guest
Sep 19th, 2019
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.84 KB | None | 0 0
  1. <?php
  2.  
  3. /**
  4. * Unhooking the woocommerce wrappers
  5. */
  6. remove_action( 'woocommerce_before_main_content', 'woocommerce_output_content_wrapper', 10);
  7. remove_action( 'woocommerce_after_main_content', 'woocommerce_output_content_wrapper_end', 10);
  8.  
  9. /**
  10. * Using custom hooks for woocommerce
  11. */
  12. add_action('woocommerce_before_main_content', 'my_theme_wrapper_start', 10);
  13. add_action('woocommerce_after_main_content', 'my_theme_wrapper_end', 10);
  14.  
  15. function my_theme_wrapper_start() {
  16. echo '<section id="main">';
  17. }
  18.  
  19. function my_theme_wrapper_end() {
  20. echo '</section>';
  21. }
  22.  
  23. /**
  24. * Declaring woocommerce support
  25. */
  26. add_theme_support( 'woocommerce' );
  27.  
  28.  
  29. /**
  30. * Adding woocommerce product gallery features
  31. */
  32. add_action( 'after_setup_theme', 'maxxshop_gallery_setup' );
  33. function maxxshop_gallery_setup() {
  34. add_theme_support( 'wc-product-gallery-slider' );
  35. }
  36.  
  37. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement