You can easily change the layout settings on any page or post in Genesis. But what if you want to change the layout automatically on multiple pages or posts for some reason?
An example of this is changing the layout for logged in members. You can easily do this using the conditional tag:
Add the conditional tag to a custom function with any of the standard i.d’s used for different layouts and it works perfectly.
Change Layout Of Single Posts For Logged In Members
Here’s a working example which you can add to your child themes functions.php file.
Simply change the i.d using any these default layouts included in Genesis.
Change Layout in Template File
Rather than use custom functions with conditional tags to change layout from your functions file, you can also add one line of PHP directly to any template file.
This example creates a full width layout. You’ll find this line of code is already included in most front.page.php, home.php or page_landing.php template files.
Change front-page.php or home.php layout
Simply add this code directly to your home.php or front-page.php file to add a sidebar.
Conditional Tag Based on Layout
This code enables you to execute code based on the page layout used. In this example, the code is executed on any page or post which uses the full width layout. You can change the layout in the code to any other layout your Genesis child theme includes.