WordPress.org

Ready to get started?Download WordPress

Forums

WooCommerce - excelling eCommerce
Woocommerce order by popularity (1 post)

  1. trm1989
    Member
    Posted 1 year ago #

    I have wp_query that outputs products for custom plugin :

    $query_args = array( 'posts_per_page' => 10,
                         'post_status' => 'publish',
                         'post_type' => 'product',
                         'paged' => $paged); 
    
    $r = new WP_Query($query_args);
    
    while ($r->have_posts()) : $r->the_post(); global $product;

    I need to sort products by popularity, How can I do this?

    http://wordpress.org/plugins/woocommerce/

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic