Topic: Search Alphabetically by display name

Hi There,

I'm just experimenting with your great plugin (with very simple instructions!) to see if it can work as a basic directory

I've followed all of the steps, and it's close, but I can't seem to get it to Search Alphabetically without Last Name.

My users will all be schools and they won't have their first and last name fields showing on the page.

http://boardingexpo.com.au/directory/

Thanks so much for your help.

Belinda

Re: Search Alphabetically by display name

Try the following:

Change line 204 from this:
$this->q .= " and c.meta_key = 'last_name' and SUBSTRING(LOWER(c.meta_value),1,1) = '$this->query' ";

To this:
$this->q .= " and SUBSTRING(LOWER(a.display_name),1,1) = '$this->query' ";

Also, change line 313 from this:
$r = '<div class="tern_members_alpha">Search alphabetically <span>(by last name)</span>:<br /><ul>';

To this:
$r = '<div class="tern_members_alpha">Search alphabetically <span>(by display name)</span>:<br /><ul>';

Let me know if that works for you.