WordPressで投稿にSticky(先頭に表示)してもCategoryページだと反映されません。
で、次のようにしてみました。
// sticky $args = array( 'posts_per_page' => 1, 'post__in' => get_option( 'sticky_posts' ), 'ignore_sticky_posts' => 1 ); query_posts( $args ); while ( have_posts() ) : the_post(); get_template_part( 'content', get_post_format() ); endwhile; wp_reset_query(); // 残りの投稿 $wp_query->query_vars['post__not_in'] = get_option( 'sticky_posts' ); query_posts( $wp_query->query_vars ); while ( have_posts() ) : the_post(); get_template_part( 'content', get_post_format() ); endwhile; |