Max per page
-
Hey,
Great little plugin, thanks.
i have one problem, in my custom query it includes the sticky post and puts it in front as expected, the only problem is that when I say the posts_per_page = 6 it wil add the sticky posts and the total will increase.
This doesn’t happen with the plain posts, the total posts per page stays the same there and I would expect this would be also the case with my custm posts in combi with your little plugin.
The query I use is:
function l4l_get_lawyers( $num = - 1 ) { $args = [ 'post_type' => 'lawyers', 'posts_per_page' => $num, 'meta_key' => 'l4l_country', 'orderby' => array( 'l4l_country', 'post_name' ), 'order' => 'ASC' ]; $result = query_posts( $args ); wp_reset_query(); return $result; }
Hope you can help me.
Thanks,
Niels
- The topic ‘Max per page’ is closed to new replies.