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 | |
add_filter('blocksy:general:shortcodes:blocksy-posts:args', function ($query_args, $shortcode_args) { | |
if (isset($shortcode_args['years'])) { | |
$years = array_map('intval', explode(',', $shortcode_args['years'])); | |
$query_args['date_query'] = array( | |
'relation' => 'OR', | |
array_map(function ($year) { | |
return array('year' => $year); | |
}, $years) | |
); |
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
@media (max-width: 690px) { | |
.flexy-view .flexy-items { | |
--sliderHeight: 250px !important; } | |
div.woocommerce-product-gallery li { | |
--thumbs-width: 25% !important; | |
} |
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 | |
// Change the hook as you want | |
// Remove "//"s if you want to check the color attribute specific term | |
add_action( 'woocommerce_product_meta_end', function () { | |
global $product; | |
$attributes = $product->get_attributes(); | |
if ( isset( $attributes['pa_color'] ) ) { | |
// $color_terms = wc_get_product_terms( $product->get_id(), 'pa_color', array( 'fields' => 'names' ) ); | |
// if ( in_array( 'Red', $color_terms ) ) { // Check if 'Red' is one of the terms |
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 | |
add_filter('blocksy:general:shortcodes:blocksy-posts:args', function ($query_args, $shortcode_args) { | |
if (is_singular('portfolio')) { | |
$query_args['post__not_in'] = array(get_the_ID()); | |
} | |
return $query_args; | |
}, 10, 2); |
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_id = get_field('your_acf_field_name'); | |
if ($product_id) { | |
$product = wc_get_product($product_id); | |
if ($product) { | |
$product_description = $product->get_description(); | |
echo $product_description; | |
} | |
} |
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
<a href="#ct-quick-view-<?php echo get_the_ID(); ?>" class="ct-open-quick-view" aria-label="Quick View">Quick View</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
.entry-tags > a { | |
--price-tag-height: 25px; | |
--price-border-radius: 4px; | |
position: relative; | |
display: inline-flex; | |
height: var(--price-tag-height); | |
margin-left: calc(var(--price-tag-height) / 2); | |
padding: 0 calc(var(--price-tag-height) / 2); | |
color: #fff; |
NewerOlder