term_id;} if($current_cat_id==84||$current_cat_id==89||$current_cat_id==95){ ?>
'post', 'post_status' => array('publish','future'), 'orderby' => 'date', 'order' => 'asc', 'posts_per_page' => '-1', //'category__in' => array(pll_get_term(84)), 'tax_query' => array(), 'meta_query' => array( array( 'key' => 'pinned', 'value' => '1', 'compare' => '!=', ) ), 'date_query' => array( array( 'after' => date('Y-m-d'), 'inclusive' => true ) ), ); if(!empty($_GET['q'])){ if(preg_match("/\#[\s\S]*/",$_GET['q'])){ $args['tax_query'][]=array( 'taxonomy' => 'post_tag', 'field' => 'name', 'terms' => preg_replace("/\#/","",$_GET['q']), ); }else{ $args['s']=$_GET['q']; } } $posts = query_posts($args); $args=array( 'post_type' => 'post', 'post_status' => array('publish','future'), 'orderby' => 'date', 'order' => 'asc', 'posts_per_page' => '-1', //'category__in' => array(pll_get_term(84)), 'tax_query' => array(), 'meta_query' => array( array( 'key' => 'pinned', 'value' => '1', 'compare' => '=', ) ), ); if(!empty($_GET['q'])){ if(preg_match("/\#[\s\S]*/",$_GET['q'])){ $args['tax_query'][]=array( 'taxonomy' => 'post_tag', 'field' => 'name', 'terms' => preg_replace("/\#/","",$_GET['q']), ); }else{ $args['s']=$_GET['q']; } } $posts_pinned = query_posts($args); if($posts||$posts_pinned){ echo " "; }else{ echo "

".pll__('No results','Custom')."

"; } ?>

'post', 'post_status' => 'publish', 'orderby' => 'date', 'order' => 'desc', 'posts_per_page' => $per_page, 'offset' => $offset, //'category__in' => array(pll_get_term(116)), 'tax_query' => array(), 'meta_query' => array( array( 'key' => 'pinned', 'value' => '1', 'compare' => '!=', ) ), 'date_query' => array( array( 'before' => date('Y-m-d'), ) ), ); if(!empty($_GET['q'])){ if(preg_match("/\#[\s\S]*/",$_GET['q'])){ $args['tax_query'][]=array( 'taxonomy' => 'post_tag', 'field' => 'name', 'terms' => preg_replace("/\#/","",$_GET['q']), ); }else{ $args['s']=$_GET['q']; } } $posts = query_posts($args); if($posts){ echo " "; the_posts_pagination(array( 'format'=>'?offset=%#%', 'prev_text'=>'<', 'next_text'=>'>', 'current'=>$current_page, )); }else{ echo "

".pll__('No results','Custom')."

"; } ?>