Community Forums › Forums › Archived Forums › General Discussion › No Sidebar page template for Education Pro
Tagged: education pro, Sidebar
- This topic has 13 replies, 3 voices, and was last updated 9 years, 9 months ago by
websiteproducer.
-
AuthorPosts
-
August 3, 2015 at 8:26 am #161246
websiteproducer
MemberHi,
How do I make a template without a sidebar in Education Pro?
I see that the Default Template adds a sidebar and I want to keep that but I'd like the option to NOT have a sidebar.
The Landing Page template removes headers and footers.
Thanks
August 3, 2015 at 8:50 am #161260Brad Dalton
ParticipantAdd this PHP to the file
add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_full_width_content' );
Or use the Layout Settings
August 3, 2015 at 8:57 am #161263websiteproducer
MemberHi, sorry ... which PHP file ... and where should I add it?
and will that give me the 'option' to select a new template for full width?
August 3, 2015 at 9:10 am #161265Victor Font
ModeratorIf you use the layout settings, you don't have to add any code. Go to the Genesis/Theme Settings menu and choose the full-screen layout as the default.
Regards,
Victor
https://victorfont.com/
Call us toll free: 844-VIC-FONT (842-3668)
Have you requested your free website audit yet?August 3, 2015 at 9:17 am #161270websiteproducer
MemberBut then how would I add sidebars?
Most of the site has sidebars except there are two pages where I would like full width? In those cases I thought I would select a template that said Full Width (instead of Default)
August 3, 2015 at 9:23 am #161272Brad Dalton
ParticipantIf you don't want to use the Layout Settings located on every Edit Page screen, you can create a template in your child themes root directory and add the code to that file.
Example template:
<?php /* Template Name: Full Width Page Template */ //* Force full width content layout add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_full_width_content' ); genesis();
Then select it from the Page Attributes box located on all Page Edit screens.
August 3, 2015 at 10:00 am #161279Brad Dalton
ParticipantAugust 3, 2015 at 10:03 am #161280websiteproducer
MemberDo I go into FTP, save a copy of page_landing.php and name it page_full_width.php
and then add this code to very top?
<?php
/*
Template Name: Full Width Page Template
*///* Force full width content layout
add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_full_width_content' );genesis();
August 3, 2015 at 10:09 am #161284websiteproducer
MemberHere's ALL of the code on that page
<?php /** * This file adds the Landing template to the Education Pro Theme. * * @author StudioPress * @package Education Pro * @subpackage Customizations */ /* Template Name: Full Width Page Template */ //* Add landing body class to the head add_filter( 'body_class', 'education_add_body_class' ); function education_add_body_class( $classes ) { $classes[] = 'education-pro-landing'; return $classes; } //* Force full width content layout add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_full_width_content' ); add_filter( 'genesis_site_layout', '__genesis_return_full_width_content' ); //* Remove site header elements remove_action( 'genesis_header', 'genesis_header_markup_open', 5 ); remove_action( 'genesis_header', 'genesis_do_header' ); remove_action( 'genesis_header', 'genesis_header_markup_close', 15 ); //* Remove navigation remove_action( 'genesis_before_header', 'genesis_do_nav' ); remove_action( 'genesis_footer', 'genesis_do_subnav', 7 ); //* Remove breadcrumbs remove_action( 'genesis_before_loop', 'genesis_do_breadcrumbs' ); //* Remove site footer widgets remove_action( 'genesis_before_footer', 'genesis_footer_widget_areas' ); //* Remove site footer elements remove_action( 'genesis_footer', 'genesis_footer_markup_open', 5 ); remove_action( 'genesis_footer', 'genesis_do_footer' ); remove_action( 'genesis_footer', 'genesis_footer_markup_close', 15 ); //* Run the Genesis loop genesis();
August 3, 2015 at 10:11 am #161286Brad Dalton
ParticipantAugust 3, 2015 at 10:16 am #161287websiteproducer
MemberOk code looks like this:
<?php /* Template Name: Full Width Page Template */ //* Force full width content layout add_filter( ‘genesis_pre_get_option_site_layout’, ‘__genesis_return_full_width_content’ ); genesis();
How do I get this page to show up as a Page Attribute under Pages so I can select it?
August 3, 2015 at 10:17 am #161289websiteproducer
MemberActually it does show up now under Page Attributes ...
Except Sidebars are still there.
August 3, 2015 at 10:23 am #161292Brad Dalton
ParticipantYou need to select the template for that page and click update.
And don't forget the Layout Settings enable you to choose flu width also.
August 3, 2015 at 10:38 am #161296websiteproducer
MemberAh ... went to Layout Settings and changed it, it worked. Thx so much! Really appreciate your help!!
-
AuthorPosts
- The forum ‘General Discussion’ is closed to new topics and replies.