Event HTML Location

Home Forums Calendar Products Events Calendar PRO Event HTML Location

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #268109
    persyst
    Participant

    How can I have HTML I add in the “Event HTML” sections before/after event, NOT show up on the Calendar page and only show up in an actual event? Basically I’ve added social share buttons, but I don’t want them to show up on the Full Calendar, only Events.

    Thanks,
    Stefan

    #270169
    Barry
    Member

    Hi – great question!

    Here’s a short snippet you could add to your theme’s functions.php file that should help:

    add_filter( 'tribe_events_before_html', 'singular_custom_html_only' );
    
    function singular_custom_html_only( $html ) {
    	return ! is_singular() ? '' : $html;
    }

    This example would only impact on the before field, but you could apply it to both by repeating the first line of code (but change tribe_events_before_html to tribe_events_after_html in the second line).

    Does that help?

    #270734
    persyst
    Participant

    Thanks, that worked!!

    #274293
    Barry
    Member

    Excellent!

    I’ll go ahead and close this thread in that case, but do feel free to open new threads as needed if you need any further assistance and – if you have a moment – we’d also love to hear your thoughts on The Events Calendar so far 🙂

    Thanks again!

Viewing 4 posts - 1 through 4 (of 4 total)
  • The topic ‘Event HTML Location’ is closed to new replies.