Silly newbie question about themer’s guide

Home Forums Calendar Products Events Calendar PRO Silly newbie question about themer’s guide

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #1268006
    cyrilsack
    Participant

    Hi folks,

    I’m dipping my toe into making adjustments to my Events Calendar templates, but I’m already struggling. I’m trying to implement the simple example given in the themer’s guide of inserting the event organizer under each event’s title. Here’s the code I put into a copy of single-event.php:
    <!– Event content –>
    <?php do_action( ‘tribe_events_single_event_before_the_content’ ) ?>
    <div class=”tribe-events-single-event-description tribe-events-content”>
    <?php the_content(); ?>
    </div>
    <!– .tribe-events-single-event-description –>
    <?php do_action( ‘tribe_events_single_event_after_the_content’ ) ?>

    Organized by: <?php echo tribe_get_organizer(); ?>

    <!– Event meta –>
    <?php do_action( ‘tribe_events_single_event_before_the_meta’ ) ?>
    <?php tribe_get_template_part( ‘modules/meta’ ); ?>
    <?php do_action( ‘tribe_events_single_event_after_the_meta’ ) ?>
    Does the location of the code seem correct?

    Secondly, once the code is correct, what tells the Events Calendar to check the new folder in my child theme instead of just defaulting to the plugin template? What makes it go to themes/make-child/events-calendar/single-event.php instead of plugins/events-calendar/src/views/single-event.php?

    Thanks for any help provided!

    #1268196
    Geoff
    Member

    Hi @cyrilsack,

    Thanks for getting in touch!

    The code you provided looks good. What I did notice, however, is that the template you are overriding should be here:

    [your-theme]/tribe-events/single-event.php

    …instead of:

    [your-theme]/events-calendar/single-event.php

    The Events Calendar is always looking for a folder called “tribe-events” in the active theme and knows to use the templates in that folder before the ones included in the plugin by default.

    Cheers!
    Geoff

    #1268630
    cyrilsack
    Participant

    thanks Geoff! I’ve got the single-event.php file in the tribe-events subfolder, but it still doesn’t seem to change the display on site.

    #1268772
    Geoff
    Member

    Hey there, @cyrilsack!

    Hmm, that’s pretty odd. The override seems to work when I try it out on my test site.

    Here’s the full code for the single-event.php file I used in my test:

    https://gist.github.com/geoffgraham/7a82b0d75b7edbaae410083a76dc2446

    Try copying and pasting that into your template and making sure that the template is located in the correct folder: [your-theme]/tribe-events/single-event.php

    That code should add the name of the event organizer below the title of the event when viewing the event post. Here’s a screenshot of how that looks on my test site.

    Hopefully that does the trick. 🙂

    Cheers!
    Geoff

    #1278602
    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 5 posts - 1 through 5 (of 5 total)
  • The topic ‘Silly newbie question about themer’s guide’ is closed to new replies.