I am using the Listimia theme along with WordPress 5.3, Geodirectory 2.0.0.70, and Geodirectory Location Manager 2.0.0.22. Unfortunately, I was way too far along in my development when I realized that the theme is using the GD > Locations widget on the homepage in a way that it was apparently never designed to be used. No matter what type of location I choose (city, region, or country), I can only display the first X (whatever Number of Locations I selected) locations of that type, chosen alphabetically. This is of course not much use for a “Popular Location” section on the homepage. While I would ideally be able to select the specific locations to display, an acceptable workaround is to just choose randomly from all of the specified location types. In order to do that, I have had to change line 426 of general-functions.php to
$main_location_query = "SELECT " . $fields . " FROM " .GEODIR_LOCATIONS_TABLE." WHERE 1=1 " . $search_query . " GROUP BY $location_args[what] ORDER BY rand() $limit";
. This works, but is certainly not ideal since I will have to make the same change every time the plugin is updated, and it has the potential to affect other areas of the site, as well. Would it be possible to add a checkbox to the widget settings such as “Randomize locations” and the code to support it? Or am I just missing something and this should already be possible?