• Hello,

    Is there any argument how to loop only for sale price products?

    I try this:

    $args = array(
        'posts_per_page' => 4,
        'orderby' => 'post_date',
        'post_type' => "download",
    	'meta_query' => array(
    		array(
    			'key'     => 'edd_sale_price',
    		),
    	),
    );

    But it doesn’t work.

Viewing 1 replies (of 1 total)
  • Plugin Author Jeroen Sormani

    (@sormano)

    Hi Yudi,

    Apologies for the late response, I don’t always get email notifications of new threads on w.org ??

    The meta_query arguments should also have a ‘compare’ and possible also a ‘value’ element, ‘compare’ defaults to ‘=’ for a exact match, and since you have no ‘value’ it’ll likely only match products with a empty ‘edd_sale_price’ meta value.

    Cheers,
    Jeroen

Viewing 1 replies (of 1 total)
  • The topic ‘Custom loop is only for sale price products.’ is closed to new replies.