'key' => 'size,
'value' => array(50, 100 ),
'type' => 'NUMERIC',
'compare' => 'BETWEEN'
$args = array(
'posts_per_page' => 10,
'category_name' => 'stati',
'post_status' => 'publish',
'meta_query' => array(
array(
'key' => 'color',
'compare' => 'EXISTS'
)
)
);
$query = new WP_Query( $args );
while ( $query->have_posts() ) {
$query->the_post();
the_title();
}
wp_reset_postdata();
<?php $i = 1; if ( $query->have_posts() ) : while ( $query->have_posts() ) : $query->the_post(); ?>
<li>
<span class="li--span"><span class="li--span--category"><?php the_category( ', ' ); ?></span></span>
<a href="<?php the_permalink() ?>" class="li--a">
<span class="little_content"><?php the_title(); ?></span>
</a>
</li>
<?php if ( $i == 4 ) { echo 'картинка'; } ?>">
<?php $i++; endwhile; ?>
$( document ).ready(function() {
});
$sticky = get_option( 'sticky_posts' );
$args = array(
'category__not_in' => array(1, 13, 14, 15, 18),
'post_type' => array('post'),
'publish' => true,
'paged' => get_query_var('paged'),
'posts_per_page' => 10,
'ignore_sticky_posts' => 1,
'post__not_in' => $sticky
);
query_posts($args);
while ( have_posts() ) : the_post();
get_template_part( 'content', 'shortpost' );
endwhile;
wp_reset_postdata();
navigation();