Sorting listings does not respect parent category

Hi!

By chance I realized that sorting listings with the “Sort by” function will sort listings according to their lowest subcategory first, even when a higher category is selected in the search form.

Steps to reproduce

Create a category with 2 or more subcategories. For example: category PROPERTIES and subcategories Apartments, Rooms, Studios. Let’s say they are ordered like that (0, 1, 2)

Create 2 listings for each subcategory, changing some attributes (price, size…).

Now, when searching for PROPERTIES in general in the search form, all listings will appear (apartments, rooms and studios).

Try to sort the listings by price (or any other attribute). For example, low to high price.

Actual result

Listings are sorted according to their subcategory instead of by the search parameter (PROPERTIES). So, first the apartments will show, sorted from low to high, then the rooms show, sorted from low to high, and then the studios, sorted from low to high.

Expected result

Listings should be sorted according to the search term (PROPERTIES). So, if the cheapest listing is a studio, it should show first, then the second most expensive (apartment, room or studio), etc…

Extra details

You need to have at least two listing under each created category to see the results.

Hopefully this can be fixed soon

Thanks!

Hi,

We checked this issue from our side, and it seems okay. Please disable third-party plugins and customizations (if there are any) and check if this issue persists. If you use a caching plugin, make sure that caching is disabled for logged-in users. Alternatively, it may be a problem on the part of the hoster, so I recommend reviewing its settings or contacting their support.

​I hope this is helpful to you.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.