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 4 years, 8 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
  • Author
    Posts
  • #506656

    Jesse Hall
    Free User
    Post count: 15

    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!

    #506657

    Jesse Hall
    Free User
    Post count: 15
    This reply has been marked as private.
    #506663

    Guust
    Moderator
    Post count: 29970

    Add a new tab for a shortcode, and add this shortcode [adjust as required]:

    [gd_listings post_type="gd_place" sort_by="distance_asc"]

    Thanks

    #506775

    Jesse Hall
    Free User
    Post count: 15

    I’m not sure where you’re saying to do this is at?

    #506839

    Jesse Hall
    Free User
    Post count: 15
    This reply has been marked as private.
    #506848

    Guust
    Moderator
    Post count: 29970

    Have a look at the settings of the Address custom field.
    Is that field set to show in the Listings page?

    Let us know. Thanks.

    #506850

    Jesse Hall
    Free User
    Post count: 15

    No 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!

    #506853

    Guust
    Moderator
    Post count: 29970

    The 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

    #506953

    Jesse Hall
    Free User
    Post count: 15

    Gotcha.

    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!

    #507034

    Guust
    Moderator
    Post count: 29970

    You 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

    #507178

    Jesse Hall
    Free User
    Post count: 15

    I 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?

    #507227

    Alex Rollin
    Moderator
    Post count: 27815

    When 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/

    #507263

    Guust
    Moderator
    Post count: 29970

    Have 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.

    #507421

    Jesse Hall
    Free User
    Post count: 15

    Thanks 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>

    #507446

    Alex Rollin
    Moderator
    Post count: 27815

    I 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

Viewing 15 posts - 1 through 15 (of 16 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket