-
Notifications
You must be signed in to change notification settings - Fork 8
Templates
Ivan edited this page Aug 18, 2022
·
8 revisions
- The main difference in development in Starter is custom templates: instead of hell with hooks just use raw data from woo!
For example: instead of getting thumbnails with 💩-markup - just get ids array and use with any your own markup:and use it with any markup$starter_thumbnails = $product->get_gallery_image_ids() //get thumbnail ids on single page
<?php foreach ( $starter_thumbnails as $starter_thumbnail_img ) : ?> <picture> <?php echo starter_img_func([ 'img_src' => 'w200', 'img_sizes' => '70px', 'img_id' => $starter_thumbnail_img ]); ?> </picture> <?php endforeach; ?>
- Theme contain custom tempaltes for home, archive, single.
- Account/cart/checkout are not ovverrided, they are styled using css (and a bit js to add css classes) because usually these pages very similar and it's not easy to get raw data and to maintain (due so much logic present on checkout for example).
-
folder
templates
contains custom page templates and partials. -
folder
woocommerce
contain woocommerce overrides: some templates slightly changed likewoocommerce\product-searchform.php
, but some is in fact 100% custom template likewoocommerce\single-product.php
-
folder
woocommerce-custom
contain custom template's files for woocommerce -
root of theme contain
footer.php
,header.php
,index.php
,page.php