where do I put new page.php file?

Home Forums Calendar Products Events Calendar PRO where do I put new page.php file?

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #64604
    elewis
    Participant

    I’m trying to use a modified page.php file as a template for the events calendar pro (the default page.php file has a sidebar and I want it full width). What do I need to name the php file and where do I need to put it? I read through the themer’s guide and it said I should put it here:
    /wp-content/themes/incarnation/tribe-events/list/
    I also tried
    /wp-content/themes/incarnation/tribe-events/pro/list/
    I gave it other names as well (full-width.php,single-event.php, default-event.php). None of those solutions has added the template to the list of available templates. Is there something I’m missing?

    #64637
    elewis
    Participant

    Also, if I change back to the twenty-twelve theme, there are more options in the template drop-down menu, including a full-width page.

    #64657
    Barry
    Member

    Hi elewis,

    There are a few things you might do here. One is to add a check in the existing page.php template to test if an event request is being handled, then load your customized version from there, something like this:

    if ( tribe_is_event_query() ) {
    get_template_part('page-events');
    return;
    }

    Alternatively, you could override our own default-template.php template (your copy would live in the your-theme/tribe-events directory) and essentially put all of your customizations in there.

    Does that help?

    #64813
    elewis
    Participant

    Not really. I took the full-width.php file that came with my theme (incarnation) and copied it into incarnation/tribe-events and renamed it to default-template. Then I chose the default events template from the drop down menu. Now the events page grabs the content from an event rather than displaying the calendar.

    #65294
    Barry
    Member

    Hi elewis,

    Copying an existing theme template and simply renaming it probably isn’t going to achieve the best result here and that’s not quite what I meant, though it might form a starting point. Did you manage to keep any of the original code, particularly these lines?


    <?php tribe_events_before_html(); ?>
    <?php tribe_get_view(); ?>
    <?php tribe_events_after_html(); ?>

    Ideally they would replace “the loop” from your copy of full-width.php. Hope that helps – but if not maybe you could try the first strategy I outlined instead?

    #65339
    elewis
    Participant

    Actually, I downgraded to version 2 and am planning on keeping that version until the theme developer works out the kinks with the new version of the events calendar.

    #65353
    Barry
    Member

    OK, well if that works for you great – do bear in mind however that we can offer only minimal support for plugins earlier than the 3.x series. For the time being though it sounds like you’re all good and I’ll close this thread.

    Thanks!

Viewing 7 posts - 1 through 7 (of 7 total)
  • The topic ‘where do I put new page.php file?’ is closed to new replies.