Make an Calendar page full width using ENFOLD theme. (SOLVED)

Home Forums Calendar Products Events Calendar PRO Make an Calendar page full width using ENFOLD theme. (SOLVED)

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #152349
    khedrubje
    Participant

    Hi.
    I am trying to remove the sidebar in enfold. I am following this tutorial but i am not sure where to put the text in my page.php
    <?php if ( ! tribe_is_event_query() || ( tribe_is_event_query() && is_singular() ) ) get_sidebar(); ?>
    Could you please help.
    Thank you…
    my page.php file
    https://dl.dropboxusercontent.com/u/5056314/page.php

    https://theeventscalendar.com/selectively-removing-sidebars-in-twenty-twelve/

    #152777
    Barry
    Member

    Hi!

    Sounds like you’re on track however the problem when applying this to different themes is that they all have a different structure, sometimes it’s really very different from what you might find in a default theme like Twenty Twelve.

    Looking at your page.php template – and personally being unfamiliar with Enfold – I can’t really tell where the sidebar is loaded, but suspect it is in a different template such as header.php, includes/loop.php, footer.php or maybe even in some other template in turn loaded from one of those.

    Without knowing that information I’m afraid it’s pretty hard to guide you. Perhaps you could reach out to the theme author and ask them which template specifically the code for loading the sidebar lies in – then apply the logic to conditionally hide it in there?

    #153193
    khedrubje
    Participant

    I think the php file i am after is sidebar.php
    Could please help identifying the line that requires editing.
    Thx
    https://dl.dropboxusercontent.com/u/5056314/sidebar.php

    #153216
    khedrubje
    Participant

    I edited my page.php file but it removes all the sidebar info on all the pages. Are these anchors still correct for this version of events calendar.
    if ( ! tribe_is_event_query() || ( tribe_is_event_query() && is_singular() ) ) get_sidebar(); ?>

    #154137
    Barry
    Member

    So if you want to remove the sidebar from single event posts – and sidebar.php is definitely the template that pulls in the sidebars in the context of your theme (it of course sounds as if it is, but you never know!) then you might add something like this right under the opening <?php tag:

    // Is a single event being displayed? If so, bail out of this template
    if ( tribe_is_event( get_the_ID() ) && is_single() ) return;

    I hope that helps!

    #155637
    khedrubje
    Participant

    ………. SOLUTION ……………………
    Hope this helps someone else out. Basically follow this tutorial. But make these changes to the following pages.

    https://theeventscalendar.com/selectively-removing-sidebars-in-twenty-twelve/

    …….. FUNCTION.PHP page …….

    add_filter(‘body_class’, ‘tribe_make_events_fullwidth’);

    function tribe_make_events_fullwidth($classes) {
    if ( in_array(‘full-width’, $classes) ) return $classes;
    if ( tribe_is_event_query() && ! is_singular() ) $classes[] = ‘fullsize’;
    return $classes;
    }

    ……PAGE.PHP……………..

    <?php

    //get the sidebar

    $avia_config[‘currently_viewing’] = ‘page’;

    if ( ! tribe_is_event_query() || ( tribe_is_event_query() && is_singular()))

    get_sidebar();

    ?>
    </div><!–end container–>

    …….GRID.CSS – wp-content/themes/enfold/css/grid.css …….

    .responsive_large .fullsize .container .nine.units {
    width: 100%;
    }

    #158278
    Barry
    Member

    Excellent, glad you got there and thanks for sharing that solution 🙂

Viewing 7 posts - 1 through 7 (of 7 total)
  • The topic ‘Make an Calendar page full width using ENFOLD theme. (SOLVED)’ is closed to new replies.