Using Offset in Custom Post Type Query
Reason of this behavior is pretty simple. First of all you have to know that get_posts uses WP_Query to get posts. So let’s look at WP_Query implementation. On line 1998 of query.php you can find: if ( $q[‘posts_per_page’] == -1 ) { $q[‘nopaging’] = true; Then on line 2544 of query.php you find: if ( … Read more