Thread Starter
Beee
(@beee)
WP version is 3.5, not 3.4.2
you can changed that by modifying template file at wp-contents/plugins/events-manager/templates/templates/events-search.php
e.g.
from location_country
changed to location_name
to use templates: http://wp-events-plugin.com/documentation/using-template-files/
Thread Starter
Beee
(@beee)
Can you clarify what to change ?
$countries = em_get_countries();
$em_countries = $wpdb->get_results("SELECT DISTINCT location_country FROM ".EM_LOCATIONS_TABLE." WHERE location_country IS NOT NULL AND location_country != '' AND location_status=1 ORDER BY location_country ASC", ARRAY_N);
Thread Starter
Beee
(@beee)
changed ORDER BY location_country to ORDER BY location_name.
Doesn’t work.
Thread Starter
Beee
(@beee)
if you look at the source code, you see what I explained in my first post. It gets sorted by the country abbreviations instead of the country name.
<option value="AU" >Australia</option>
<option value="BE" >Belgium</option>
<option value="CA" >Canada</option>
<option value="CZ" >Czech Republic</option>
<option value="ES" >Spain</option>
<option value="FI" >Finland</option>
<option value="FR" >France</option>
<option value="GB" >United Kingdom</option>
<option value="US" >United States</option>
Thread Starter
Beee
(@beee)
After adding more countries, the list gets bigger and more ‘messed up’. I think it can be fixed by changing the following:
line 64 in events-search.php
ORDER BY location_country ASC
to
ORDER BY location_something ASC
where something is a variable I don’t know.
Who has the solution ?
Thread Starter
Beee
(@beee)
Just checked in phpmyadmin to which values are available.
The country as a full name is not store in the database and therefor not sortable (afaik).
I would recommend to insert the column which holds the full name/title from a country so it can be sorted on that field instead of on location_country.
Hope Marcus reads this.
good point… will fix this asap.
Thread Starter
Beee
(@beee)
Good to hear.
Marking this topic resolved.