1

Trying to get this table to sort by default by "publish_date" Where can I add it?

    $transaction_params = array(
                              'posts_per_page' => $page_size,
                              'post_type' => 'realadv_transaction',
                              'post_status' => 'publish',
                              'exclude' => $used_transactions,
                              'suppress_filters' => false,
                              'tax_query' => array(
                                array(
                                  'taxonomy' => 'realadv_transaction_type',
                                  'field' => 'term_id',
                                  'terms' => $group['transaction_groups_types']->term_id,

1 Answer 1

0

You can sort this by adding

'orderby' => 'date', 
'order' => 'DESC',

into the $transaction_params array. and if not working change

'suppress_filters' => true,

See reference: here

Thank you.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.