UTF-16 | UTF-8 | DESCRIPTION | SAMPLE |
---|---|---|---|
\U0022 | \x22 | QUOTATION MARK | " |
\U0027 | \x27 | APOSTROPHE | ' |
\U201C | \xe2\x80\x9c | LEFT DOUBLE QUOTE | “ |
\U201D | \xe2\x80\x9d | RIGHT DOUBLE QUOTE | ” |
\U2018 | \xe2\x80\x98 | LEFT SINGLE QUOTE | ‘ |
\U2019 | \xe2\x80\x99 | RIGHT SINGLE QUOTE | ’ |
\u002d | \x2d | A HYPHEN | - |
\u2013 | \xe2\x80\x93 | AN EN DASH | – |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Demo: https://stone-digital-test.myshopify.com/pages/tag-loop-example | |
<!-- Step 1) create comprehensive list of all tags ie. tags_list --> | |
{% capture tags_list %} | |
{% for product in collections.all-products.products %} | |
{% for tag in product.tags %} | |
{{ tag | strip | strip_newlines }}{% if forloop.last == true %}{% else %},{% endif %} | |
{% endfor %}{% if forloop.last == true %}{% else %},{% endif %} | |
{% endfor %} | |
{% endcapture %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Array( | |
[key] => b2518060b99e87b333629133e91ee828 | |
[product_id] => 57317 | |
[variation_id] => 0 | |
[variation] => Array | |
( | |
) | |
[quantity] => 1 | |
[data_hash] => b5c1d5ca8bae6d4896cf1807cdf763f0 | |
[line_tax_data] => Array |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Array( | |
[key] => ############################ | |
[product_id] => 57317 | |
[variation_id] => 0 | |
[variation] => Array() | |
[quantity] => 1 | |
[data_hash] => ########################## | |
[line_tax_data] => Array( | |
[subtotal] => Array() | |
[total] => Array() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// this is to create a Nested Array | |
// eg. multiLevelArray[0][0] | |
var multiLevelArray = new Array(loop.length); | |
for (var k = 0; k < loop.length; k++) { | |
multiLevelArray[k] = new Array(loop[k].valueA, loop[k].valueB); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<div class="grid-container"> | |
{% for collection in collections %} | |
<div class="grid-item"> | |
<div class="grid-item-photo"> | |
<a href="{{ collection.url }}"> | |
{% for image in collection.images limit:1 %}<img src="{{ image }}" alt="{{ image.alt | escape }}">{% endfor %} | |
</a> | |
</div> | |
<div class="grid-item-title"> | |
<a href="{{ collection.url }}">{{ collection.title }}</a> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Pre-populate Woocommerce checkout fields | |
* Note that this filter populates shipping_ and billing_ fields with a different meta field eg 'first_name' | |
*/ | |
add_filter('woocommerce_checkout_get_value', function($input, $key ) { | |
if($key == 'billing_first_name') { | |
return 'NEW FIRST NAME'; | |
} | |
if($key == 'billing_last_name') { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$product = wc_get_product($product_id); | |
if( $product->is_on_sale() ) { | |
$discount = $product->get_regular_price() - $product->get_sale_price(); | |
} | |
else { | |
$discount = 0; | |
} | |
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if ( is_page_template( 'template-name.php' ) ) { | |
// template-name.php is used | |
} | |
?> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Remove admin bar | |
**/ | |
add_filter('show_admin_bar', '__return_false'); | |
/** | |
* Register Custom Post Type | |
**/ |
OlderNewer