Switch active CPT displayed on gd_homepage_map
This topic contains 11 replies, has 3 voices, and was last updated by Guust 7 years, 8 months ago.
We have moved to a support ticketing system and our forums are now closed.
Open Support TicketTagged: Template Pages
-
AuthorPosts
-
February 25, 2018 at 7:24 pm #419167
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.
February 25, 2018 at 10:29 pm #419185You should use the GD Listings map for that purpose:
https://wpgeodirectory.com/docs/widgets/#listing-map
https://wpgeodirectory.com/docs/core-shortcodes/#listingAnd these pages are also auto-created at /venues/ and /events/
Thanks
February 26, 2018 at 6:01 am #419211Hi 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.
February 26, 2018 at 8:23 am #419218Hello,
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
DoneAdd 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
February 26, 2018 at 8:56 am #419229Hi 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?
February 26, 2018 at 10:09 am #419235All good,
Got it sorted out thanks !!
February 26, 2018 at 10:55 am #419247One 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]
February 26, 2018 at 12:47 pm #419263That can only be done using the GD generated Events pages.
ThanksFebruary 27, 2018 at 12:34 pm #419470Hi,
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?
February 27, 2018 at 12:50 pm #419480The 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
March 5, 2018 at 12:02 pm #420347I get it thanks.
March 5, 2018 at 12:14 pm #420352Thanks for letting us know. Feel free to open a new ticket if you have any other issues.
Thanks -
AuthorPosts
We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket