php - how can i make wordpress display posts from the second top 10 posts? -




i using code display in main page posts number of views

        function wh_post_display_order_view($query) {     if ($query->is_home() && $query->is_main_query()) {         $query->set('meta_key', 'whpp_track_post_views');         $query->set('orderby', 'meta_value_num');         $query->set('order', 'desc');         } }        add_action('pre_get_posts','wh_post_display_order_view'); 

how can make display posts second top 10 posts? ex : want 1st post appears number 11 in viewed posts

you can use offset parameter so:

$query->set('offset', 10);   

more pagination , wp query class here





wiki

Comments

Popular posts from this blog

Asterisk AGI Python Script to Dialplan does not work -

python - Read npy file directly from S3 StreamingBody -

kotlin - Out-projected type in generic interface prohibits the use of metod with generic parameter -