Home › Forums › Calendar Products › Events Calendar PRO › Custom Venue Map
- This topic has 3 replies, 2 voices, and was last updated 10 years, 11 months ago by
George.
-
AuthorPosts
-
May 15, 2015 at 8:13 pm #963087
Chris
ParticipantIs it possible to allow an area for admin to upload a map to Venue and have it display instead of Google Maps or as well as Google Maps on the front end?
May 18, 2015 at 7:39 am #963242George
ParticipantHey Chris,
Something like this would indeed be possible, but would unfortunately require some code customization beyond the scope of support here.
The customizations should be fairly simple though, in the grand scheme of things – it seems like you could just enable the “Featured Image” thumbnail feature for the Venue post type, and upload map images to that. (This “Featured Image” thumbnail feature can be seen in your admin if you go to add/edit a post or page, or even an Event).
Enabling this requires just two things. First, ensure that your Venues post type has support for Featured Image thumbnails. You can do that by adding code like the following to your theme’s functions.php file:
add_action( 'init', 'tribe_963087_add_thumbnails_to_venues' ); function tribe_963087_add_thumbnails_to_venues() { add_post_type_support( 'tribe_venue', 'thumbnail' ); }Read more about this add_post_type_support() function here → https://codex.wordpress.org/Function_Reference/add_post_type_support
Then, all you’d have to do is start using these new thumbnails and upload your custom map images to them, and just display it as you’d like on your site. There are many ways to do this – look for some of WordPress’ core functions like the_post_thumbnail(), which you can learn about here → https://codex.wordpress.org/Function_Reference/the_post_thumbnail
You can use functions like this to get the featured images in any of your Tribe Venue templates. To learn about customizing these, check out this page here → https://theeventscalendar.com/knowledgebase/themers-guide/
There’s a lot of information and links here and such, but the customization is actually quite simple despite all of that. Keep a good backup of your site and all your code before you start on these customizations, and play around with things a bit – you should be able to put together something quite useful.
Cheers!
GeorgeMay 21, 2015 at 2:18 am #964127Chris
ParticipantBrilliant, thanks…
May 21, 2015 at 9:43 am #964196George
ParticipantNo problem! Best of luck with these customizations – keep good backups of your site and database so you can restore your site in the rare case something breaks! 🙂
Cheers,
George -
AuthorPosts
- The topic ‘Custom Venue Map’ is closed to new replies.
