Support » Plugin: Post Expiration Date » Order By Expiration Date In a WP Query

  • Im assuming its something along these lines, but not!

    $args = array(
    ‘post_type’ => ‘product’,
    ‘posts_per_page’ => -1,
    ‘orderby’ => ‘hugu_ped_expire_date_metabox’
    );

    Im guessing I need to meta_value or something like that but just not sure.

Viewing 1 replies (of 1 total)
  • Meta field is called “expires” so try something like this (I didn’t test it)

    $q = new WP_Query(
    array(
    ‘meta_key’ => ‘expires’
    )
    );

Viewing 1 replies (of 1 total)
  • The topic ‘Order By Expiration Date In a WP Query’ is closed to new replies.