Is it possible to turn off the ability to sort the listings in order of highest or lowest rating on the listing search screen? Thank you.
Hi,
Please try this PHP snippet:
add_filter(
'hivepress/v1/forms/listing_sort',
function( $form ) {
unset( $form['fields']['_sort']['options']['rating__asc'], $form['fields']['_sort']['options']['rating__desc'] );
return $form;
},
1000
);
1 Like
Thank you!
Sorry, can I get rid of the sorting function itself?
You can hide the whole drop-down with this CSS snippet:
.hp-form--listing-sort {display:none!important}
2 Likes
It worked! Thank you very much for your help. Thank you very much.
1 Like
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.