Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Fetching a URL parameter from within an asp_query_args callback function › Reply To: Fetching a URL parameter from within an asp_query_args callback function
December 11, 2024 at 11:44 am
#52239
Participant
Thanks! This works, only thing I had to change was:
$event_mode = $_GET['event_mode'] ?? <strong>''</strong>;
Otherwise it would always be set to ‘past’.
The last thing I need is ordering. I saw in the documentation:
$args['post_primary_order'] = "relevance DESC";
But there is no mention for ordering by custom field. I would like to order descending by custom field evcal_srow.
I did the following and it looks like it’s working, but wanted to confirm with you this is the correct code:
$args['post_primary_order'] = "customfp DESC";
$args['orderby_primary_cf'] = "evcal_srow";