Changing the html of single event

Home Forums Calendar Products Events Calendar PRO Changing the html of single event

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #1195268
    Johan
    Participant

    I am trying to change the mark-up on the single event view but can’t locate the necessary file. Basically having the date in a H2 makes it too big and I wish to change it. I could of course change it using css, but I want to learn how WPs php works so piecing together how the strings are made teaches me a lot.

    I have located the string for date start (<span>$inner) but can’t find where the H2 is added.

    Help would be appreciated.

    #1195304
    Geoff
    Member

    Hi Johan,

    Hope you had a great weekend!

    That H2 heading is located in the single-event.php file, which you can locate here:

    /wp-content/plugins/the-events-calendar/src/views/single-event.php

    The heading is located on Line 37:

    <?php echo tribe_events_event_schedule_details( $event_id, '<h2>', '</h2>' ); ?>

    You can make the change directly there, but the safer way to do it is to override the template in your theme to make sure your changes do not get lost on future plugin updates:

    • Make a new folder in your theme called tribe-events
    • Add the single-event.php file in that folder

    Now that the theme is in your theme, you can make the changes you need and they’ll be reflected in the calendar. 🙂

    Will that do the trick for you? Please let me know!

    Cheers,
    Geoff

    #1205266
    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 ‘Changing the html of single event’ is closed to new replies.