var $pagingInfo = $('.paging-info');
var $heroSlider = $('.hero-slider');
$heroSlider.on('init reInit afterChange', function(event, slick, currentSlide, nextSlide){
var i = (currentSlide ? currentSlide : 0) + 1;
var prefix = i < 10 ? '0' : '';
var prefixAll = slick.slideCount < 10 ? '0' : '';
$pagingInfo.html('<span class="current">' + prefix + i + '</span>' + '/' + prefixAll + slick.slideCount);
});
var $pagingInfo = $('.paging-info');
var $heroSlider = $('.hero-slider');
$heroSlider.on('init reInit afterChange', function(event, slick, currentSlide, nextSlide){
var i = (currentSlide ? currentSlide : 0) + 1;
var prefix = i < 10 ? '0' : '';
var prefixAll = slick.slideCount < 10 ? '0' : '';
$pagingInfo.html('<span class="current">' + prefix + i + '</span>' + '/' + prefixAll + slick.slideCount);
});
<?php the_field('some_option', 7); ?>
<?php
if ( is_product_category() ){
global $wp_query;
$cat = $wp_query->get_queried_object();
$thumbnail_id = get_term_meta( $cat->term_id, 'thumbnail_id', true );
$image = wp_get_attachment_url( $thumbnail_id );
if($image) {
echo '<div class="title-img"><img src="' . $image . '" alt="' . $cat->name . '" /></div>';
}
}
?>
add_filter( 'subcategory_archive_thumbnail_size', function( $size ) {
if ( function_exists( 'is_product_category' ) ) {
return 'full';
}
return $size;
} );
<div class="cart-option">
<div class="option-item name">White Gold</div>
<div class="option-item value">$90</div>
</div>
.cart-option {
width: 100%;
display: flex;
justify-content: space-between;
position: relative;
margin-bottom: 5px;
&::before {
content: "";
width: 100%;
height: 1px;
border-bottom: 2px dotted #C9C9C9;
position: absolute;
left: 0;
bottom: 7px;
}
.option-item {
padding: 0 3px;
background-color: #fff;
position: relative;
z-index: 1;
font-size: 16px;
font-weight: 400;
color: #818181;
}
.value {
font-weight: 700;
}
}
.text-wrapper {
margin-left: calc(50% - 1140px/2);
padding-left: 15px;
padding-right: 15px;
}
if ( $product->is_type('variable') ) {
foreach ( $product->get_available_variations() as $variation ) {
foreach ( wc_get_product($variation['variation_id'])->get_variation_attributes() as $attr ) {
echo wc_attribute_label( $attr );
}
$active_price = floatval($variation['display_price']);
$regular_price = floatval($variation['display_regular_price']);
if ( $active_price != $regular_price ){
$sale_price = $active_price;
}
echo '<span class="variation-prices"><strong>Price</strong>: '.$variation['price_html'].'</span><br>';
}
}
$('.open-modal-btn').on('click', function (e) {
e.preventDefault();
var $title = $(this).parents('.cf7-item').find('.cf7-title').text();
$('#call-to-action').find('.modal-target').val($title);
var $target = $(this).attr('data-target');
openModal($target);
});