WP query sticky is not sticky
-
Im showing posts from specific category on my home page.
2 categories to be exact.But when sticky posts are not sticky when i run this query meaning the posts are organized by date.
I want sticky posts to be sticky what am i missing in this query?
<?php $args = array( 'post_type' => 'post', 'post_status' => 'publish', 'category_name' => 'category1,category2', 'posts_per_page' => -1, 'ignore_sticky_posts' => -1 ); $arr_posts = new WP_Query( $args ); if ( $arr_posts->have_posts() ) : while ( $arr_posts->have_posts() ) : $arr_posts->the_post(); ?> <?php get_template_part( 'template-parts/content', esc_attr( treville_get_option( 'blog_layout' ) ) ); ?> <?php endwhile; endif; ?>
Viewing 6 replies - 1 through 6 (of 6 total)
Viewing 6 replies - 1 through 6 (of 6 total)
- The topic ‘WP query sticky is not sticky’ is closed to new replies.