template-surecart-blank.php
2 years ago
template-surecart-collection.php
1 year ago
template-surecart-dashboard.php
5 days ago
template-surecart-product.php
1 year ago
template-surecart-collection.php
26 lines
| 1 | <?php |
| 2 | get_header(); |
| 3 | global $content_width; |
| 4 | echo '<style> |
| 5 | .sc-template-wrapper, |
| 6 | .sc-template-container { |
| 7 | width: 100%; |
| 8 | } |
| 9 | .sc-template-wrapper .sc-template-container { |
| 10 | max-width: var(--wp--style--global--wide-size, ' . (int) ( $content_width ?? 1170 ) . 'px) !important; |
| 11 | margin-left: auto; |
| 12 | margin-right: auto; |
| 13 | } |
| 14 | </style>'; |
| 15 | $collection = sc_get_collection( get_queried_object_id() ); |
| 16 | $template_part = $collection->template_part_id; |
| 17 | $template_part = $template_part ? $template_part : 'surecart/surecart//product-collection-part'; |
| 18 | ?> |
| 19 | <div class="wp-block-group is-layout-constrained sc-template-wrapper" style="margin-top:0;margin-bottom:0;padding-top:var(--wp--preset--spacing--70);padding-bottom:var(--wp--preset--spacing--70)"> |
| 20 | <div class="wp-block-group alignwide sc-template-container"> |
| 21 | <?php sc_block_template_part( $template_part ); ?> |
| 22 | </div> |
| 23 | </div> |
| 24 | <?php |
| 25 | get_footer(); |
| 26 |