Support » Plugin: WooCommerce » Total_sale, highest amount

  • Been trying to get the informations from total_sale, with the highest amount for ages now. and i haven’t been able to get anything. Thought that i could do something along this way

    global $product, $woocommerce_loop, $post;

    $args = array(‘post_type’ => ‘product’,
    ‘orderby’ => ‘total_sales’,
    ‘order’ => ‘asc’,
    ‘limit’ => ‘1’);

    $loop = new WP_Query( $args );
    foreach( $loop as $pooosts) : ?>

    <div class=”pFocus”>
    <div class=”focus-inner”>
    **add code with highest_amounthere ****
    <?php endforeach; ?>

    But that does absolute not help me anything. I hope there is someone out there that can help me get this.. SO i can write the correct thing out with the highest amount.

    What i want it to write out, is picture, price sale price.. and such stuff.. and the link to the page.. I might be going in the wrong direction.. Please help me!

    PS the site is not up yet

  • The topic ‘Total_sale, highest amount’ is closed to new replies.