Different template for single event page

Home Forums Calendar Products Events Calendar PRO Different template for single event page

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #963833
    festivalsamsterdam
    Participant

    Hi guys,

    I have gone trough a lot of documentation and discussions here, but please give me a little further help.

    I would like to use the regular template in all calendar views, but a different one on the single event view.

    I created a new template (page-test.php) in my child theme and added the lines below on top of this template file and I’ve chosen for this template in the event settings. The single event page returns a blank page.

    <?php /* Template Name: page-test */ ?>
    
    <?php 
    if (tribe_is_event() && is_single()) {
            get_template_part('page-test');
            return;
    }
    ?>

    I tried this the other way around as well, so adding these lines on my default template (page.php). But again, single view returns blank.

    Please help me out 🙂 Thanks!

    #963905
    Brian
    Keymaster

    Hi

    Thanks for using our plugins I can try to help out here.

    I do not think the coding you provided would work as you are not hooking into the WordPress to determine which template to use. I do not have coding available on how to do that, but WordPress may have examples on changing a single custom post type template.

    I would instead look to modifying our single-events template which you can do following our themer’s guide:

    https://theeventscalendar.com/knowledgebase/themers-guide/

    Let me know if you have any follow up questions.

    Thanks

    #973738
    Brian
    Keymaster

    Since I haven’t heard back from you here, I’m going to go ahead and close out this thread. Feel free to start a new thread if you have further issues. Thanks! 🙂

Viewing 3 posts - 1 through 3 (of 3 total)
  • The topic ‘Different template for single event page’ is closed to new replies.