Output location name in description
This topic contains 10 replies, has 3 voices, and was last updated by ukvape 6 years, 1 month ago.
We have moved to a support ticketing system and our forums are now closed.
Open Support TicketTagged: location
-
AuthorPosts
-
October 27, 2019 at 4:07 pm #515032
Is there a shortcode or easy way to output the location name in the description. I want to edit the loaction page and add a description e.g
Here you will find the best bakery in {location}, on our directory you will find the bakeries and cake makers in {location}
edit: I dont want to do this manually on each location as i know that has it’s own seo but all locations on this directory will have the same structure
October 27, 2019 at 5:51 pm #515039GeoDirectory Location Manager provides the “Location Description” field for each location, which can be displayed with the GD Location description element.
https://wpgeodirectory.com/docs-v2/addons/location-manager/#location-data
The same exists for categories, the Category Top Description
https://wpgeodirectory.com/docs-v2/places/categories/
Don’t forget the Titles and Metas settings:
https://wpgeodirectory.com/docs-v2/geodirectory/settings/general/#titles-and-meta
Those and more are referenced on our SEO FAQ here:
https://wpgeodirectory.com/docs-v2/faq/seo/October 27, 2019 at 7:19 pm #515049Thanks for the fast reply. I understand that, but is there a way to insert a shortcode that just displays the Location name in the location description as this seems to be the easiest way as all locations will have the same description (except the region) and it seems pointless adding the same location description 1000+ times
Here is an example of how easy it would make my life, so only on the GD Locations Page i need this
October 27, 2019 at 7:28 pm #515051To do that your best bet is the Location Description field, which has exactly that kind of replacement tag.
Also the GD Badge element can use location tags like badge=”%%city%%”
October 27, 2019 at 7:38 pm #515053There must be an easy way of doing this. Where is the title called from and how is it called for a region?
October 27, 2019 at 7:42 pm #515054There aren’t simple text tag replacements available in the archive template, that would require a customization.
There are more options for a details page template, like badges, or GD Post Address with a template=”%%region%%” but you might need some CSS to adjust it.
October 27, 2019 at 7:45 pm #515055I am quite fluent in editing files so even if there is an echo i could add for the location name i could do it that way and call the description after the title.
If you could tell me which file and what to echo to get the location name it would be awesome 🙂
October 27, 2019 at 7:54 pm #515056The developers might know of a workaround. They are off Monday and Tuesday so it will be after that if they know of a quick solution.
October 27, 2019 at 9:07 pm #515061Thanks Alex, top support as always 😉
October 28, 2019 at 2:56 pm #515154Hi @ukvape
you can add below code snippet and use it in page content as [page_title] to show the title.
function my_customgd_shortcode_title( ){ return get_the_title(); } add_shortcode( 'page_title', 'my_customgd_shortcode_title' );GD tags support for page/post content is not yet available.
Thanks
December 3, 2019 at 3:10 am #519646Sorry for the late reply but this works a dream and exactly what i wanted to achieve. Thanks so much guys 😉 Keep up the good work
-
AuthorPosts
We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket