• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

Tribe EVents Calendar, Conditionals, and lack of page.php

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

Community Forums › Forums › Archived Forums › General Discussion › Tribe EVents Calendar, Conditionals, and lack of page.php

This topic is: not resolved

Tagged: full width, page.php, the events calendar

  • This topic has 18 replies, 3 voices, and was last updated 12 years, 9 months ago by Summer.
Viewing 19 posts - 1 through 19 (of 19 total)
  • Author
    Posts
  • September 25, 2013 at 5:24 pm #64189
    suzyo
    Member

    Hi all. I'm using the ModernTribe Events Calendar (TEC), including the Community Submissions Form. TEC uses the default theme's layout settings.

    Here's my problem: I need to either #1 apply conditionals to get rid of the sidebars, or #2 force full-width on the Community Submission Form. There's no other way to do it.

    The url to the form is below.

    TEC support says to apply conditionals to page.php, specifically,

    "The Community Events plugin uses your theme’s page.php template so you’ll want to edit that and use the following conditional code to detect when you are on one of the community pages and show/hide whatever sidebar you want that way.":

    'if(tribe_is_community_edit_event_page()) {

    echo 'this is the submit/edit events page!';'

    }

    but this is Genesis. I don't gotz no page.php. What to do? Where is my beloved Brad Alton? Note: I am open to new beloved(s).

    http://sandboxing.capemyers.com/events/community/add
    September 25, 2013 at 5:39 pm #64192
    Summer
    Member

    If you edit those pages, do you see the "Layout Settings" meta box? You could just select the full width layout there... you may or may not have to adjust your screen options to see it.

    If you don't have that in there, do the calendar and submission form use specific page templates? That's where you'd add the conditional, otherwise.

    If not, you could make a page template, switch those pages to that template, and the only thing in that template you'd have would be the call to force a full width layout. I've had to do that myself on occassion 🙂


    WordPress / Genesis Site Design & Troubleshooting: A Touch of Summer | @SummerWebDesign
    Slice of SciFi | Writers, After Dark

    September 25, 2013 at 5:43 pm #64194
    suzyo
    Member

    HI Summer, and thanks. The problem is that a template cannot be applied to the TEC stuff, it's not on a "page". It uses the page of the theme it is applied to.

    See what I'm sayin'?

    September 25, 2013 at 5:48 pm #64196
    Summer
    Member

    Not exactly...

    are you using shortcodes to put the calendar in a specific page or post? If so, that is the page or post you'd select the different layout for. That's what I had to do when I added a Time.Ly events calendar to a couple of my sites.

    If that's not how you're using it, could you explain a little more how you're putting the calendar on your site?


    WordPress / Genesis Site Design & Troubleshooting: A Touch of Summer | @SummerWebDesign
    Slice of SciFi | Writers, After Dark

    September 25, 2013 at 5:58 pm #64197
    Tony @ AlphaBlossom
    Member

    Hi, I'm not familiar with the Community Submissions Form, never used it, but maybe this will help get you going:

    add_filter('genesis_pre_get_option_site_layout', 'abte_full_width_layouts');
    function abte_full_width_layouts($layout) {
         if ( 'tribe_events' == get_post_type() ) {
              $layout = 'full-width-content';
         }
         return $layout;
    }
    

    That would go in your functions.php (child theme) file.

    All Tribe Events Calendar pages will be full width. I couldn't tell if you're ok with that, or only the Community Submission Form.


    Tony Eppright | http://www.AlphaBlossom.com | Follow me on twitter @_alphablossom

    September 25, 2013 at 6:04 pm #64200
    suzyo
    Member

    Hi Tony, hi Summer, thank you.

    Tony, I want the Community Events submission form to be the only full-width "page".

    Summer, the Community Events submission form is not a page, rather, it displays by dynamic, on-the-fly creation of a "page" based on your theme's page.php. No shortcodes, because, no place to put 'em. Conditionals only, to be written on the underlying page, which is your theme's page.php, which does not exist in Genesis.

    The Events Calendar itself uses a number of templates, but there IS NO TEMPLATE for the submission form.

    Yeah, weird, I know. As I wrote above, the dev says:

    "The Community Events plugin uses your theme’s page.php template so you’ll want to edit that and use the following conditional code to detect when you are on one of the community pages and show/hide whatever sidebar you want that way."

    I can't apply the conditional(s) to a template that doesn't exist. (Actually I tried to add it to page.php in the Genesis Framework itself, but, no go.)

    It's hump day.

    September 25, 2013 at 6:22 pm #64204
    Tony @ AlphaBlossom
    Member

    Maybe this will help you:

    https://tri.be/support/forums/topic/conditionals-to-change-page-on-submission-form/

    It lists two conditionals:
    tribe_is_community_edit_event_page()
    tribe_is_community_my_events_page()

    also says the new version (a couple days away) will use the same template as the calendar.


    Tony Eppright | http://www.AlphaBlossom.com | Follow me on twitter @_alphablossom

    September 25, 2013 at 6:26 pm #64206
    suzyo
    Member

    Tony, you linked me to my own post, and, if you look carefully, you'll see that they did not answer my question.

    My question is how to apply the conditionals when there is no page.php in Genesis.

    September 25, 2013 at 6:33 pm #64208
    Tony @ AlphaBlossom
    Member

    hehe that's funny...sorry.

    How about this:

    if ( tribe_is_community_edit_event_page() || tribe_is_community_my_events_page() ) {

    If that doesn't work, i'll have to leave it for someone else to try.


    Tony Eppright | http://www.AlphaBlossom.com | Follow me on twitter @_alphablossom

    September 25, 2013 at 6:35 pm #64209
    suzyo
    Member

    TONY! Have you read any of the posts? I KNOW HOW TO USE THE CONDITIONALS. THE PROBLEM IS THAT THERE IS NO PLACE TO PUT THEM BECAUSE GENESIS DOES NOT HAVE A PAGE.PHP

    September 25, 2013 at 6:36 pm #64210
    suzyo
    Member

    And, thank you, but I'm frustrated. Nobody has understood the question.

    September 25, 2013 at 6:36 pm #64211
    Tony @ AlphaBlossom
    Member

    Take it easy, no need to yell. Just trying to help. Have a great night...


    Tony Eppright | http://www.AlphaBlossom.com | Follow me on twitter @_alphablossom

    September 25, 2013 at 6:53 pm #64217
    Tony @ AlphaBlossom
    Member

    Tony, you linked me to my own post, and, if you look carefully, you’ll see that they did not answer my question. My question is how to apply the conditionals when there is no page.php in Genesis.

    BTW, this is marked as private, so as carefully as I looked I could not read this nor their reply (also private). Just fyi.


    Tony Eppright | http://www.AlphaBlossom.com | Follow me on twitter @_alphablossom

    September 25, 2013 at 6:56 pm #64219
    suzyo
    Member
    This reply has been marked as private.
    September 25, 2013 at 7:09 pm #64222
    Summer
    Member

    You wouldn't add that conditional to the page.php in the framework, because you'd lose it next time you updated Genesis.

    Did you try creating a page.php in your child theme, and put the conditionals to make the submission form full width there?


    WordPress / Genesis Site Design & Troubleshooting: A Touch of Summer | @SummerWebDesign
    Slice of SciFi | Writers, After Dark

    September 25, 2013 at 7:11 pm #64223
    suzyo
    Member

    No, because the calendar would not be using this new page.php, because it doesn't exist. As I keep saying, TEC Community Events submission form is not written on a page, nor does it make use of a page. It is created dynamically, on-the-fly, and uses the underlying page.php.

    HOWEVER, I don't HAVE a page.php, so it is using something ELSE.

    To create a page.php would be like yelling to Mars while the people on Jupiter are waiting for your message.

    September 25, 2013 at 7:54 pm #64228
    Summer
    Member

    You said the Tribe people told you to modify the theme's page.php, therefore it is using page.php.

    Since there isn't one in the child theme, it defaults to using the one in the framework, but if you create one in the child theme, that one will supercede the one from the framework. That's the beauty of child themes.

    So if you make a page.php in the child theme and customize it, it will do the work that the default framework one is currently doing.


    WordPress / Genesis Site Design & Troubleshooting: A Touch of Summer | @SummerWebDesign
    Slice of SciFi | Writers, After Dark

    September 25, 2013 at 8:32 pm #64234
    suzyo
    Member

    Thanks, Sommer. I did that earlier. This is the framework's page.php

    '<?php
    /**
    * Genesis Framework.
    *
    * WARNING: This file is part of the core Genesis Framework. DO NOT edit this file under any circumstances.
    * Please do all modifications in the form of a child theme.
    *
    * @package Genesis\Templates
    * @author StudioPress
    * @license GPL-2.0+
    * @link http://my.studiopress.com/themes/genesis/
    */

    //* This file handles pages, but only exists for the sake of child theme forward compatibility.
    genesis(); '

    September 25, 2013 at 10:22 pm #64239
    Summer
    Member

    Yup, so make a copy of that in your child theme folder, then add the conditionals you need, and any other custom calls you want before the "genesis()" call, and you should be good to go.


    WordPress / Genesis Site Design & Troubleshooting: A Touch of Summer | @SummerWebDesign
    Slice of SciFi | Writers, After Dark

  • Author
    Posts
Viewing 19 posts - 1 through 19 (of 19 total)
  • The forum ‘General Discussion’ is closed to new topics and replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2026 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble