if (the_ID == 48777) {
Тут свой тайтл
}
else {
the_title()
}
update yourtable set newdatetimefield=from_unixtime(timestampfield);
update yourtable set newdatetimefield=from_unixtime(timestampfield);
/*сворачиваем комменты*/
$(".children").after("<a href='#' class='collapce_comment'>Развернуть</a>");
$('.collapce_comment').click(function(){
$(this).closest('.comment').find('.children').slideToggle(300, function(){
if ($(this).is(':hidden')) {
$(this).parent().find('.collapce_comment').html('Развернуть');
} else {
$(this).parent().find('.collapce_comment').html('Свернуть');
}
});
return false;
});
function kurs_comment( $comment, $args, $depth ){
?><div <?php comment_class() ?> id="comment-<?php comment_ID() ?>">
<div class="comment-body">
<?php echo get_avatar( $comment, 60, '', '', array( 'class' => 'comment-avatar' ) ) ?>
<div class="comment-content">
<span class="comment-author"><?php comment_author() ?></span>
<span class="comment-date"><?php comment_date( 'j F Y в H:i' ) ?></span>
<div class="comment_body"><?php comment_text() ?></div>
</div>
</div>
<?php // без закрывающего </div> (!)
}
function kurs_end_comment( $comment, $args, $depth ){
echo '</div>';
}
wp_list_comments( array(
'callback' => 'misha_comment',
'end-callback' => 'misha_end_comment'
) );
if (!$.cookie('was')) {
setTimeout(function () {
$.magnificPopup.open({
items: {
src: '#smt-popup-promo',
},
type: 'inline',
removalDelay: 300
});
}, 3000);
};
$.cookie('was', true, {
expires: 365,
path: '/'
});
<?php
$paged = (get_query_var('page')) ? get_query_var('page') : 1;
$args = array(
'post_type' => 'post',
'posts_per_page' => 6,
'orderby' => 'date',
'paged' => $paged,
'order' => 'DESC',
);
$q = new WP_Query($args);
?>
<a data-fancybox data-type="ajax" href="products/{$product->url}?preview" class="item__img lazy" data-src="{$product->image->filename|resize:1200:1200}" {if $product->image} style="background-image: url({$product->image->filename|resize:1200:1200});"{/if}></a>
.attr(_srcset, element.attr(srcsetAttribute))
ругается на эту строчку// do it as single 'attr' calls, to be sure 'src' is set after 'srcset'
var imageSrc = (_isRetinaDisplay && elementRetina ? elementRetina : element.attr(srcAttribute)) || '';
imageObj.attr(_sizes, element.attr(sizesAttribute))
.attr(_srcset, element.attr(srcsetAttribute))
.attr(_src, imageSrc ? imageBase + imageSrc : null);
$queried_object = get_queried_object(); // объект
$product_cat = $queried_object->product_cat;// таксономия (category или другое)
$term_id = $queried_object->term_id; // ID
$cat_field = get_field('description_category', $product_cat . '_' . $term_id); // значение вашего поля