Home › Forums › Calendar Products › Events Calendar PRO › Make an Calendar page full width using ENFOLD theme. (SOLVED)
- This topic has 6 replies, 2 voices, and was last updated 11 years, 12 months ago by
Barry.
-
AuthorPosts
-
May 6, 2014 at 9:22 pm #152349
khedrubje
ParticipantHi.
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.phphttps://theeventscalendar.com/selectively-removing-sidebars-in-twenty-twelve/
May 7, 2014 at 7:21 am #152777Barry
MemberHi!
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?
May 7, 2014 at 2:52 pm #153193khedrubje
ParticipantI 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.phpMay 7, 2014 at 3:15 pm #153216khedrubje
ParticipantI 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(); ?>May 8, 2014 at 2:41 pm #154137Barry
MemberSo 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
<?phptag:// 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!
May 9, 2014 at 3:52 pm #155637khedrubje
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%;
}May 12, 2014 at 12:00 pm #158278Barry
MemberExcellent, glad you got there and thanks for sharing that solution 🙂
-
AuthorPosts
- The topic ‘Make an Calendar page full width using ENFOLD theme. (SOLVED)’ is closed to new replies.
