add_action( 'pre_get_posts', 'wpse183601_filter_category_query' );
function wpse183601_filter_category_query( $query ) {
if( !is_admin() && $query->is_main_query() ) {
$query->set( 'meta_key','post_views_count' );
$query->set( 'orderby','meta_value_num' );
$query->set( 'order','DESC' );
}
}
if (in_array($url, $blacklist)) {
// redirect
}
$('.your-element').on('beforeChange', function(event, slick, currentSlide, nextSlide){
console.log(currentSlide); // индекс текущего слайда
});
var image = new Image();
image.src = "path/to/image.png";
image.onload = function () {}
$(window).bind('load', function(){
$(window).on('load', function(){
$(window).load( function(){
$(window).load( function(){
setTimeout(function(){
var col = $('.bigphoto .slick-active').attr('index');
var count = $('.bigphoto .slick-slide').length;
var count_clone = $('.bigphoto .slick-cloned').length;
$("#total").text(count-count_clone);
if(count_clone > 1){
function sec() {
var col = $('.bigphoto .slick-active').attr('index');
m = Number(col) + 1;
$('#current').text(m);
}
setInterval(sec, 500); // использовать функцию
}else {
$("#counter_img").css( {"visibility":"hidden"} )
}
}, 200);
});