I’m facing an issue with how location data is handled in my listing titles and URLs. Currently, the location (city, region, province, and country) is being generated automatically by Google Maps. This results in the H1 and URL containing redundant information, such as the region and country, which can negatively impact SEO.
I’ve managed to modify the URL successfully to display only the city and province, but when I try to update the title, it remains unchanged even after editing the listings. Additionally, the region and country still appear in the search bar when users search, and I would like to remove this information as well.
Does anyone know a way to adjust how the RentalHive theme handles Google Maps location data, particularly to exclude the region and country from titles and search results?
If you mean to change the region title, you can do it in WP Dashboard> Listings > Regions, and everything will synchronize correctly, as synchronization is based on the region id.
Regarding the search form, please provide more details and we will try to help. Also, please note that if you search by location, the search will be based on coordinates, and this does not affect SEO in any way, since the location field is filled in via the Maps API.
Sorry if my previous message was not clear enough. In the listings settings, we can create the title of the listings based on token such as %listing.location%.
This token uses the location of the listings to auto complete the url, the h1 and the title.
This location information is generated by google map (in my case), or map box. When a city name is entered in the search input, the drop down menu open and gives you choices to auto complete.
When I click on the option in the drop down, the field autocomplete with city name, region, province and country.
When I use mapbox, region do not appear in the search bar and do not in the title h1 and url of the listings as well.
This means the token %listing.location% use the data generated by mapbox or google maps. I managed to modify the url of the listings, but the titles are not editable making them containing information I don’t want.
On airbnb, we can see that they use google maps and the search bar only contains the city name and that listings contain only city name also.
As you can see in my case Toronto is generated two times which makes redundant information and is bad for SEO. Maybe the creation of a token like %listing.location.city% would solve this or modify the way google autocomplete the location information.
Yes, we are planning to add a feature that would allow to control the format, but in this version it will require a custom implementation. If you are familiar with coding or have a developer, we can provide general guidance.
If you’re familiar with coding, please try using the hivepress/v1/models/listing/update hook, it fires when the listing is updated. If you add a high priority for the function for this hook, it will fire after all the other functions which set the title and other details. This way you can override the title, removing specific text parts.
Also you can try the hivepress/v1/models/listing/update_location hook, it fires right after the location text is saved, so it may be possible to adjust it before it’s added to the title, this may be more simple that using the global update hook.