Replace Venue with Event Category

Home Forums Calendar Products Events Calendar PRO Replace Venue with Event Category

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #964603
    Justin Wilson
    Participant

    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.

    replacement area

    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!

    #964680
    George
    Participant

    Hi 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,
    George

    #964793
    Justin Wilson
    Participant

    Thanks so much for your help! I’m sure this will get me in the right direction. I appreciate your assistance.

    #965162
    George
    Participant

    Thanks 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

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Replace Venue with Event Category’ is closed to new replies.