WordPress Business Themes › Forums › Responsive Themes › Car Dealer Theme › Change default order posts in search results page
I would like to change the default display order of search results, I use the plugin grdrts (vote plugin) and i would order my listings by number of votes.
I managed to do it for the home page by creating a shortcode [gdrts-listings] and it work perfectly.
But for search results is more complicated…
I just tried to change the url:
This method does not work, I think class_search.php modifies the request, here’s what told me the plugin creator (gdrts):
I am not sure what ‘advanced_search’ parameter is, but it is not part of WordPress. It is possible that you use some plugin for search replacement that is messing with the query. My plugin expands WP_Query WordPress uses for all types of posts queries, but if your search is using something else or modifies the query in some way to ignore changes added by other plugin, then I can’t help you with that.
What would be the simplest solution?
You can add your own query under Theme Setup >Page Setup >Search Page >Custom Sort By Options
I want to ask how to edit the sort by option.. I only want to appear on the sort option these areas.
How can I create a custom code for this one?
Please go to Theme Setup >Page Setup >Search Page >Custom Sort By Options and add your query to display option you want.
I am Richard.
What value should I select to the Default Order By so that the Custom Sort By Options will take effect?…
also what is the code for the query I want?
it this code will I paste on the custom code section?…
I want to create this query : first the featured and second the other in alternation. Can you help me?
Please post the code Theme Setup >Page Setup >Search Page >Custom Sort By Options.See attached image.The code will add more sort by option in the search results page.To set a default oderby option in the same section select an option from the ‘Default Order By’ dropdown.Note there is no option the current option in the dropdown.
I have added the code. Nothing still not happening my way.
I only want this four labels but seems all are added.
What value shall I choose on the dropdown
Please see attached Image:
Here is the output:
See attached image2:
Here is the output:
Please see attached Image
Seems nothing happens
The code am providing is meant add the option in the Sort option in the search page (just as your image) so users can click on an option they want.Its not meant to change the default oderby option for the search page.
If not sure which option to select from the ‘Default Order By’ dropdown select the first option just as my image above.This will display the listings randomly
It’s good for me for the featured is in first 😉 but in second I want a randomly order for the listings that is not featured.
Is it possible?
thanks for your help
There’s no custom query or option to have that sorting feature you want.
So how can I change the display of the labels so I can take out the title, date, nearest and expires?
so the remaining labels will just be only Popularity, Featured, Rating and Price…
or contact our support team