Incorrect sorting
-
Using this code:
<?php $the_query = new WP_Query(array( 'post_status' =>'published', 'post_type' =>'post', 'orderby' => 'meta_value_num', 'meta_key' => '_liked', 'paged' => (get_query_var('paged')) ? get_query_var('paged') : 1 )); $postslist = get_posts( $args ); foreach ($postslist as $post) : setup_postdata($post); ?> <?php the_title(); ?><br /> <?=wp_ulike_get_post_likes(get_the_ID()); ?><br /> <?php endforeach; ?> <?php wp_reset_postdata() ?>Articls displayed from 0 to x. How to make from x to 0?
I tried DESC. Don’t work anyway.What could it be?
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
The topic ‘Incorrect sorting’ is closed to new replies.