Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Not sure about the pagination thing, and this doesn't address your performance concern either, but here is a workaround I came up with a few years ago regarding the sticky posts issue.</p> <p>You basically run two queries, with the sticky posts stacked on top of the non-sticky posts. Below is a simplified version of the original code, so I haven't tested this exact code. The general principle is there however. If you want I can post the original implementation (it was a homepage widget).</p> <pre><code>&lt;ul&gt; &lt;?php $args_sticky = array( 'cat' =&gt; 2, 'post__in' =&gt; get_option( 'sticky_posts' ); ); /* *STICKY POSTS */ //Display the sticky posts next $the_query = new WP_Query( $args_sticky ); while ( $the_query-&gt;have_posts() ) : $the_query-&gt;the_post(); ?&gt; &lt;li&gt;&lt;a href="&lt;?php the_permalink(); ?&gt;" title="&lt;?php the_title(); ?&gt;"&gt;&lt;?php the_title(); ?&gt;&lt;/a&gt; &lt;?php endwhile; wp_reset_postdata(); /* *NON-STICKY POSTS */ //Display the non-sticky posts next $args = array( 'cat' =&gt; 2, 'post__not_in' =&gt; get_option( 'sticky_posts' ); ); $the_query = new WP_Query( $args ); while ( $the_query-&gt;have_posts() ) : $the_query-&gt;the_post(); ?&gt; &lt;li&gt;&lt;a href="&lt;?php the_permalink(); ?&gt;" title="&lt;?php the_title(); ?&gt;"&gt;&lt;?php the_title(); ?&gt;&lt;/a&gt; &lt;?php endwhile; wp_reset_postdata(); ?&gt; &lt;/ul&gt; </code></pre> <p>For more info see: <a href="http://codex.wordpress.org/Class_Reference/WP_Query#Pagination_Parameters" rel="nofollow">http://codex.wordpress.org/Class_Reference/WP_Query#Pagination_Parameters</a></p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload