Thanks Brook.
I looked into the query variables closer and found out that there is a hook called ‘tribe-events-bar-filters’ that I can call which allows me to specify these from the stored data I have, if they are not set in the web address from submitting a new location. This seems to be working a treat. I have put the code below if you want to have a look. Thanks!
function set_events_location()
{
if (empty($_REQUEST['tribe-bar-geoloc-lat']) && empty($_REQUEST['tribe-bar-geoloc-lng']) && empty($_REQUEST['tribe-bar-geoloc'])) {
$_REQUEST['tribe-bar-geoloc-lat'] = '__LATITUDE_HERE__';
$_REQUEST['tribe-bar-geoloc-lng'] = '__LONGITUDE_HERE__'
$_REQUEST['tribe-bar-geoloc'] = '__PLACE_NAME_HERE__';
}
} add_filter('tribe-events-bar-filters', 'set_events_location', 0, 0);
-
This reply was modified 10 years, 1 month ago by
Lee.