You should be return
ing $location from get_location
, instead of echo
ing it. Your function currently echos the location as soon as it runs, thereby outputting the result before the rest of the copy.
You should be return
ing $location from get_location
, instead of echo
ing it. Your function currently echos the location as soon as it runs, thereby outputting the result before the rest of the copy.