const displayText = () => {
const d = new Date();
let hour = d.getHours();
let mins = d.getMinutes();
if (hour == 11 && (mins >= 45 && mins <= 59)) {
const textToDisplay = `Сообщение будет отображаться с 11:45 до 12:00 по местному времени пользователя`;
document.querySelector('#element-to-display-text').textContent = textToDisplay;
}
}
displayText();
setInterval(displayText, 10000);
'hierarchical' => false
в функции register_post_type()
. А у родителя наоборот должно быть: 'hierarchical' => true
.true
и там и там - не работает. <?php
пропишите команды:update_option( 'siteurl', 'you-new-address.ru' );
update_option( 'home', 'you-new-address.ru' );
update_option( 'siteurl', 'https://newdomain.ru/' );
update_option( 'home', 'https://newdomain.ru/' );
$('a[href^="#"]').on('click', function (e) {
e.preventDefault();
var target = this.hash;
var $target = $(target);
$('html, body').stop().animate({
'scrollTop': $target.offset().top
}, 1000, 'swing', function () {
window.location.hash = target;
});
});
$args = array(
'cat' => 8,
'meta_key' => 'flat_price',
'orderby' => array( 'meta_value_num' => 'asc', 'date' => 'desc' ),
'posts_per_page'=>'-1'
);
if ( have_posts() ) : query_posts($args);
while ( have_posts() ) : the_post();
get_template_part( 'template-parts/content', 'grid' );
endwhile;
endif;
wp_reset_postdata();