Static content on events cal Pro home page ONLY

Home Forums Calendar Products Events Calendar PRO Static content on events cal Pro home page ONLY

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #1171542
    Derek
    Participant

    I’d like to be able to add some static HTML before my main content on the events calendar pro home page, but not have this repeated on single event view pages.

    Any suggestions?

    #1171928
    Nico
    Member

    Hi Derek,

    Thanks for getting in touch with us! I can help you here…

    Just paste the snippet below in your theme’s (or child theme’s) functions.php file:

    /* Tribe, insert content before calendar home page */
    function tribe_before_html_home ( $before ) {

    // bail if single event page
    if ( is_single() ) return $before;

    // your custom content
    $content = '

    Some content

    ';

    // default markup
    $content = '

    ' . $content . '

    ';

    // return
    return $content . $before;

    }
    add_filter( 'tribe_events_before_html', 'tribe_before_html_home' );

    Be sure to replace the sample content for the actual content you would like to show before the calendar.

    Best,
    Nico

    #1182556
    Support Droid
    Keymaster

    Hey there! This thread has been pretty quiet for the last three weeks, so we’re going to go ahead and close it to avoid confusion with other topics. If you’re still looking for help with this, please do open a new thread, reference this one and we’d be more than happy to continue the conversation over there.

    Thanks so much!
    The Events Calendar Support Team

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘Static content on events cal Pro home page ONLY’ is closed to new replies.