I have an issue with a shortcode I have built. The short code pulls the most recent posts based off of certain parameters. below are the parameters
extract( shortcode_atts( array ( 'numberposts' => 6, 'offset' => 0, 'featured' => null, 'trending' => null, 'showdate' => null ), $atts ) ); $args = array( 'numberposts' => $numberposts, 'offset' => $offset, 'category__not_in' => array(391), 'orderby' => 'post_date', 'order' => 'DESC', 'post_type' => 'post', 'post_status' => 'publish' );
I am running this shortcode three times on the home page. The first time is like this: (This one grabs the most recent 6 articles)
[recent-articles-grid featured="1" trending="1" showdate="1"]
The second time like this: (This one grabs the next 4 articles)
[recent-articles-grid numberposts="4" offset="6" showdate="1"]
and the third time like this: (This one is supposed to grab the remaining articles minus the first 10)
[recent-articles-grid numberposts="-1" offset="10"]
I have discovered that when I use -1 for the numberposts parameter it disregards the offset parameter. if I were to change the numberposts to something like 100 the offset works.
Is there a way to grab the remaining posts and still use the offset?