Home › Forums › Calendar Products › Events Calendar PRO › Replace Venue with Event Category
- This topic has 3 replies, 2 voices, and was last updated 8 years, 10 months ago by George.
-
AuthorPosts
-
May 22, 2015 at 2:01 pm #964603Justin WilsonParticipant
Within the Upcoming Events page, is there a way to replace the venue that appears below the date with an event category?
My clients have closed events, so they want to have an event category appear there instead of the venue. They still want to keep the venue functionality to keep the pushpins on the map.
They currently have it configured differently to avoid this issue, so I have linked an image of what they would like it to be similar to.
Thank you!
May 23, 2015 at 5:18 pm #964680GeorgeParticipantHi Alex!
This is definitely a customization you can make.ย While we cannot offer support for customizations, I can happily point you in the right direction to make this customization as simply as possible ๐
For starters, you’ll definitely want to read through our official Themer’s Guide here โ https://theeventscalendar.com/knowledgebase/themers-guide/. That’ll give you a great overview on the method for customizing calendar views in a safe way.
Once familiar with those methods, you’ll want to use them to create a theme-specific version of the follow PRO plugin file: /pro/map/single-event.php.
There’s a whole block of code here labeled with the following HTML comment, around line 54 of the original file or so:
<!-- Venue Display Info -->
Simply remove that original code and replace it with code that gets the Event Categories. There are many ways to do this, but the simplest way might be to do something like this instead:
echo '<br>'; echo tribe_get_event_taxonomy( get_the_ID(), array( 'before' => '<span style="margin-right:10px;">', 'sep' => '</span><span style="margin-right:10px;">', 'after' => '</span>' ) );
Play around with this โ explore functions within The Events Calendar itself, and general WordPress functions related to categories and such, and you should be able to get the categories displaying nicely. You can use custom CSS from there to style things exactly as you’d like.
Be sure to keep good backups of all custom code like this, too!
Best of luck with your customizations,
GeorgeMay 25, 2015 at 6:55 am #964793Justin WilsonParticipantThanks so much for your help! I’m sure this will get me in the right direction. I appreciate your assistance.
May 26, 2015 at 10:26 am #965162GeorgeParticipantThanks Alex! I do hope the information here helps, and while I’ll close up this particular thread for now, if other questions or issues arise feel free to come back and open a new one any time ๐
Cheers!
George -
AuthorPosts
- The topic ‘Replace Venue with Event Category’ is closed to new replies.