Member List Search is ignoring orderby attribute?

Hello,
We are using [s2Member-List] shortcode to create a directory. It seems to be ignoring the orderby attribute when the search function is used. Order and orderby are set as follows:

order= 'asc'

orderby='last_name' 

On initial display the directory is ordered by last name, but when using the search functionality some other order is being used.

Here is a the directory page: https://aametinternational.org/discover-eft/find-eft-practitioners/

Here is an example search: https://aametinternational.org/discover-eft/find-eft-practitioners/?s2-s=lisa

As you can see the search for Lisa is not alphabetical by last name.

Thanks

1 Like

I don’t know why, but it appears the problem is related to the fact that you’re searching for a first_name and ordering by last_name. I tried searching for “jones” and the results were ordered correctly by last_name: https://aametinternational.org/discover-eft/find-eft-practitioners/?s2-s=jones.

1 Like

The same issue happens if you use the country select drop down. We have this set up so the drop-down propagates a search.

I think for some reason it is using the default settings which I believe is orderby “registered”

Hi AJ,

Thanks for reporting it.

Yes, I’ve seen this problem with sorting by last_name before. See: S2 Member not sorting by last name on search

This is on my list and I will address it as soon as I can.

:slight_smile:

Speaking right off the top of my head, so I may be completely wrong, you may need to include the order by clause separately for each type of search.