This file contains hidden or 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
// Custom Excerpt | |
function excerpt($limit) { | |
$excerpt = explode(' ', get_the_excerpt(), $limit); | |
if (count($excerpt)>=$limit) { | |
array_pop($excerpt); | |
$excerpt = implode(" ",$excerpt) . ' …'; | |
} else { | |
$excerpt = implode(" ",$excerpt); | |
} | |
$excerpt = preg_replace('`[[^]]*]`','',$excerpt); |
This file contains hidden or 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
// *** Load gallery on division template via Ajax *** | |
function load_ajax_content () { | |
$pid = array( 'p' => $_POST['post_id'], 'post_type' => 'gallery' ); | |
$the_query = new WP_Query( $pid ); | |
if ($the_query->have_posts()) { | |
while ( $the_query->have_posts() ) { | |
$the_query->the_post(); | |
$images = get_field('photos'); |
This file contains hidden or 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
{% unless item.variant.title contains 'Default' %} | |
{% for i in (1..item.product.options.size) %} | |
<small class="specs"> | |
{% case i %} | |
{% when 1 %} | |
<span>{{ item.product.options.first }}</span> {{ item.variant.option1 }} | |
{% when 2 %} | |
{% if item.product.options.size == 2 %} | |
<span>{{ item.product.options.last}}</span> {{ item.variant.option2 }} | |
{% else %} |
NewerOlder