Last active
February 9, 2022 14:40
-
-
Save wpsmith/3666330 to your computer and use it in GitHub Desktop.
Force Specific Layout on a page
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/**** Truly Force Layout without allowing the User to Override the preferred/recommended layout ****/ | |
// Force Full Width Layout | |
add_filter( 'genesis_site_layout', '__genesis_return_full_width_content' ); | |
// Force Content-Sidebar Layout | |
add_filter( 'genesis_site_layout', '__genesis_return_content_sidebar' ); | |
// Force Sidebar-Content Layout | |
add_filter( 'genesis_site_layout', '__genesis_return_sidebar_content' ); | |
// Force Content-Sidebar-Sidebar Layout | |
add_filter( 'genesis_site_layout', '__genesis_return_content_sidebar_sidebar' ); | |
// Force Sidebar-Sidebar-Content Layout | |
add_filter( 'genesis_site_layout', '__genesis_return_sidebar_sidebar_content' ); | |
// Force Sidebar-Content-Sidebar Layout | |
add_filter( 'genesis_site_layout', '__genesis_return_sidebar_content_sidebar' ); | |
/**** Force Layout but allow the User to Override the preferred/recommended layout ****/ | |
// Force Full Width Layout | |
add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_full_width_content' ); | |
// Force Content-Sidebar Layout | |
add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_content_sidebar' ); | |
// Force Sidebar-Content Layout | |
add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_sidebar_content' ); | |
// Force Content-Sidebar-Sidebar Layout | |
add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_content_sidebar_sidebar' ); | |
// Force Sidebar-Sidebar-Content Layout | |
add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_sidebar_sidebar_content' ); | |
// Force Sidebar-Content-Sidebar Layout | |
add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_sidebar_content_sidebar' ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment