Is there a way to hide ‘SORT BY’ on the listing search page?
In particular, I want to delete the ‘date’, ‘title’ and ‘price’ fields, as they don’t make sense on my site.
Please try this PHP snippet
add_filter(
'hivepress/v1/forms/listing_sort',
function( $form ) {
unset( $form['fields']['_sort']['options']['title'], $form['fields']['_sort']['options'][''], $form['fields']['_sort']['options']['price__asc'], $form['fields']['_sort']['options']['price__desc']);
return $form;
},
1000
);
1 Like
Thank you for your help!
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.