Hello.
I have a search bar to search my database. I was wondering if it would be possible to show photos that have “Editors choice” in the database at the top of the search results. Maybe “sorting” is the best word to describe what I want to do.
~Thanks!~
Arthur😀
Hi Arthur,
There are a few ways you can accomplish this.
Sorting the results of the search query is definitely one way to go in this scenario. Take a look at the WixDataSort API reference here to see some examples and use that information to adapt it to your site’s search results needs.
You can also think of a way to accomplish this using the contains() function to get the database item that has “Editors Choice” and handle the rest of the search results accordingly.
Best Regards,
Edward
Thanks! I will try the code to see if I can make it work for me.