query – get products by custom date variable
Question
i have a product attribute called review_date, and i would like to order these products by that date. I haven’t seen a working solution yet.. what am I doing wrong here?
$args = array(
'post_type' => 'product',
'posts_per_page' => 20,
'orderby' => 'meta_value_num',
'meta_key' => 'pa_review_date',
);
0
9 months
2022-04-23T05:17:17-05:00
2022-04-23T05:17:17-05:00 0 Answers
0 views
0
Leave an answer