WP_Query – how to use it?
-
Hello,
I want to show in the sitebar of https://calatoriainimii.net/ a list of the most popular posts.
I want to make a modified version of WP_Query.
<?php $et_popular_query = new WP_Query( apply_filters( 'et_popular_query_args', array( 'posts_per_page' => 3, 'post_status'=> 'publish', 'v_sortby' => 'views', 'v_orderby' => 'desc' ) ) ); if ($et_popular_query->have_posts()) : while ($et_popular_query->have_posts()) : $et_popular_query->the_post(); ?>
Unfortunately, this doesn’t work.
Any ideas?
Viewing 3 replies - 1 through 3 (of 3 total)
Viewing 3 replies - 1 through 3 (of 3 total)
- The topic ‘WP_Query – how to use it?’ is closed to new replies.