Switch active CPT displayed on gd_homepage_map

This topic contains 11 replies, has 3 voices, and was last updated by  Guust 6 years, 1 month ago.

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

Open Support Ticket
  • Author
    Posts
  • #419167

    Dale
    Full Member
    Post count: 96

    Good Day,

    I have 2 CPT’s namely Venues(listings) & Events. I have created 2 custom page templates and would like to display the [gd_homepage_map width=100% height=450 scrollwheel=false] map on each page. My default CPT is set to Events.

    How do I set the template to call the Venue’s Post Type on the Venues page(page template) I have created.

    The default pages (listings and events) created by GeoDirectory seems to allow this switch for the mini-map in the sidebar.

    Please advise.

    #419185

    Guust
    Moderator
    Post count: 29970

    You should use the GD Listings map for that purpose:
    https://wpgeodirectory.com/docs/widgets/#listing-map
    https://wpgeodirectory.com/docs/core-shortcodes/#listing

    And these pages are also auto-created at /venues/ and /events/

    Thanks

    #419211

    Dale
    Full Member
    Post count: 96

    Hi Guust,

    Thanks for your reply.

    I have followed your recommendation and added [gd_listing_map post_type=”gd_place” width=100% height=395 scrollwheel=false] to my Venues page although it still pulls in the default CPT which is Events.

    The pages you mention ( /venues/ and /events/) are accessible on the front-end but I do not see them in my WordPress back-end so I cannot edit them.

    Looking forward to your thoughts.

    #419218

    Alex Rollin
    Moderator
    Post count: 27815

    Hello,

    You are correct that the pages created by GD are not accessible as ‘pages’ as they are created from templates in the plugin, and those are specifically post archive ‘type’ pages.

    If I understand you correctly you would like to have some kind of custom layout for each of the archive pages for each of your CPTs: events, and venues.

    These are the steps that would be taken to create a page like ‘our-venues’

    Create page, set slug to ‘our-venues’
    Add shortcode for Listing Map
    Add shortcode for GD Listing shortcode – set post_type to gd_venue
    Done

    Add additional GD Listing shortcodes as needed to sort/sift/filter your listings as needed.
    The map will only show the listings that are on the page.
    You can create your own custom CSS to hide other aspects of the map as needed.

    Let us know how it goes

    #419229

    Dale
    Full Member
    Post count: 96

    Hi Alex,

    Your suggestion works thank you; – not as I intended though as the Page Template I created allows for a full width section; – same as the home page. I insert my shortcode into the Widget area for this full-width section.

    So it seems that my Page template is not correct. Any idea what I could be doing wrong?

    #419235

    Dale
    Full Member
    Post count: 96

    All good,

    Got it sorted out thanks !!

    #419247

    Dale
    Full Member
    Post count: 96

    One last question on this topic.

    Can I filter the map via shortcode to only display default city events.

    I have this currently > [gd_listing_map post_type=”gd_event” event_type=”upcoming” width=100% height=395 zoom=”10″ scrollwheel=false]

    #419263

    Guust
    Moderator
    Post count: 29970

    That can only be done using the GD generated Events pages.
    Thanks

    #419470

    Dale
    Full Member
    Post count: 96

    Hi,

    Thanks for your reply.

    So the /event page that is created by GD. I am unable to edit this page, No? It does not display a map; – only in the sidebar.

    How would I go about creating a map that will display only a selected city (or default city) events on the GD page?

    #419480

    Guust
    Moderator
    Post count: 29970

    The Events page is a Listings page, and you can choose which widget areas you want to use at GD > Design > Listings tab
    and what widgets you want to add at Appearance > Widgets.

    See https://wpgeodirectory.com/docs/layout/#directory

    Thanks

    #420347

    Dale
    Full Member
    Post count: 96

    I get it thanks.

    #420352

    Guust
    Moderator
    Post count: 29970

    Thanks for letting us know. Feel free to open a new ticket if you have any other issues.
    Thanks

Viewing 12 posts - 1 through 12 (of 12 total)

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

Open Support Ticket