• gears001

    (@gears001)


    I’m using the “news” theme and have adjusted the following bit of code but I think I’ve ballsed it up. What I’m looking to achieve is the most popular stories from the last 7 days, but I’ve got this..

    <?php $loop = new WP_Query( array( 'meta_key' => 'Views', 'orderby' => 'meta_value', 'year=' . $year . '&m=' . $month . '&w=' . $week , 'posts_per_page' => 3 ) ); ?>

    ..and it doesn’t seem to work. It shows random posts on https://www.coolsmartphone.com

Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Quick coding question’ is closed to new replies.