Is it possible to display other locations by distance in a compact list?
This topic contains 15 replies, has 3 voices, and was last updated by  Jesse Hall 6 years, 1 month ago.
We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket- 
		AuthorPosts
 - 
		
			
				
September 5, 2019 at 10:48 pm #506656
Hello,
I’m trying to display other related listings by distance in the details page of each listing on my website.
Currently I’ve only been able to get the widget to display the other listings in a big and blocky format. However, I would like to display these listings in a more compact list.
Is this possible?
Thank you!
September 5, 2019 at 10:50 pm #506657This reply has been marked as private.September 5, 2019 at 11:05 pm #506663Add a new tab for a shortcode, and add this shortcode [adjust as required]:
[gd_listings post_type="gd_place" sort_by="distance_asc"]Thanks
September 6, 2019 at 2:34 pm #506775I’m not sure where you’re saying to do this is at?
September 6, 2019 at 8:40 pm #506839This reply has been marked as private.September 6, 2019 at 10:56 pm #506848Have a look at the settings of the Address custom field.
Is that field set to show in the Listings page?Let us know. Thanks.
September 6, 2019 at 11:17 pm #506850No it wasn’t.
I enabled it to show in the Listings page, however it’s down in the “body” of the listing, not in the title.
Is there any way to move it to the title?
Thank you!
September 6, 2019 at 11:28 pm #506853The address cannot be a part of the Title.
Do you mean you want to display the address next to the title?For that you will have to add CSS, or change the shortcodes at GD > Settings > Pages > Archive item > edit.
Be aware that also changes the look of the listings display on category and search pages.Thanks
September 7, 2019 at 6:21 pm #506953Gotcha.
What file generates the output of the listings shortcode?
I’m thinking I can edit the HTML output there to get it to do what I want, but I’m having trouble finding the correct file.
Thanks!
September 8, 2019 at 11:42 am #507034You mean the gd_listings shortcode?
The output is generated from the content of Archive item page:
GD > Settings > Pages > Archive item
You can add some custom HTML on that page to design the layout, for example wrap some of the shortcodes in a DIV so you can manipulate with CSS.Thanks
September 9, 2019 at 3:10 pm #507178I have edited some of the listings to display how I want.
However, I can’t see where to change the listing titles from H3’s. There’s a spot on the Archive Item page, but that’s for changing something that’s an H2.
Is any of the output from the gd_listings shortcode generated from one of the plugin’s php files?
September 9, 2019 at 7:48 pm #507227When you setup the GD Listings shortcode you have the option to choose the element for the title.
Try using the shortcode builder to see all the options. Make sure to click the blue button for the advanced options.
https://wpgeodirectory.com/docs-v2/geodirectory/shortcode-builder/
September 9, 2019 at 10:11 pm #507263Have a look at GD > Settings > Pages > Archive item, and try adding code like this:
<div style="float: left">[gd_post_title tag='h3']</div> <div style="float: right">[gd_post_address show="icon-label-value" address_template="%%city%%, %%zip%%, %%region%%"]</div>That will put the title and address on the same line, adjust as required.
September 10, 2019 at 3:47 pm #507421Thanks for the help!
I have gotten the title and address on the same line using the code suggested above.
However, they’re not in line with each other, and I can’t figure out how to get them to be in line.
You can see what I mean here: https://keatshair.com/local/victoria/mentone/smart-cuts-colour/
Any ideas?
Note: My end goal is to have <location title> – <distance> – <address>
September 10, 2019 at 6:24 pm #507446I see what you are trying to do there, but it will require some advanced CSS to accomplish that, outside of what we can help with here in the support forum.
You can find hands on help here: https://geodirectoryexperts.com
 - 
		AuthorPosts
 
We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket