WP_Query offset argument does not work


I want to display all posts starting from a certain offset, my query is:

WP_Query( array(
    'posts_per_page'    => -1,
    'offset'            => 20,
    'cat'               => 5,
) );

This query shows all posts without starting from the offset value. Whys is that?


>>> Share a link to this question, just copy and paste the code bellow on your web page <<<

<a href="https://www.wptricks.com/question/wp_query-offset-argument-does-not-work/">

WP_Query offset argument does not work</a>
, , rapidpage 1 month 0 Answers 53 views 0

Leave an answer