Create new layout: Secondary Sidebar / Content (No Primary)

Community Forums Forums Design Tips and Tricks Create new layout: Secondary Sidebar / Content (No Primary)

This topic is: not resolved

Tagged: ,

This topic contains 5 replies, has 2 voices, and was last updated by  SethResler 1 year, 7 months ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #39217

    SethResler
    Participant
    Post count: 17

    How can I add a new layout option: Secondary Sidebar / Content (no primary sidebar). I only want to use this layout on specific pages, so I’d like to have it as a layout option. Thanks!

    #39237

    Susan
    Moderator
    Post count: 9583

    Try this tutorial by Carrie Dils:

     

    http://www.carriedils.com/genesis-theme-tutorial-primary-sidebar/


    Susan @ Graphically Designing I offer theme customizations I tweet!
    I’ve taken up the challenge! – help me answer some of the unanswered posts

    #39255

    SethResler
    Participant
    Post count: 17

    Thanks, that was very useful!

    #39279

    SethResler
    Participant
    Post count: 17

    This tutorial is great, but there is no “custom class” option for the layout on Category or Tag archives. What can I do for these pages?

    #39669

    SethResler
    Participant
    Post count: 17

    To follow up, I also have BBPress installed, and I want to remove the primary sidebar on the BBPress pages. Is there a function that can check for a particular custom post type, and then remove the primary sidebar on that post type? Thanks!

    Alternatively, maybe a template?

    Thanks!

    #39679

    SethResler
    Participant
    Post count: 17

    I figured it out. This goes in functions.php:

    `

    //** Add sidebar-alt-content layout **//
    genesis_register_layout( ‘sidebar-alt-content’, array(
    ‘label’ => ‘Small Sidebar/Content’,
    ‘img’ => CHILD_URL . ‘/images/sidebar-alt-content’,
    ) );

    add_action(‘genesis_before’, ‘gt_new_custom_layout_logic’);
    function gt_new_custom_layout_logic() {

    $site_layout = genesis_site_layout();

    if ( $site_layout == ‘sidebar-alt-content’ ) {
    // Remove default genesis sidebars
    remove_action( ‘genesis_after_content’, ‘genesis_get_sidebar’ );
    remove_action( ‘genesis_after_content_sidebar_wrap’, ‘genesis_get_sidebar_alt’);
    add_action( ‘genesis_before_content_sidebar_wrap’, ‘genesis_get_sidebar_alt’ );

    }
    }

    `

    This post was very helpful: http://genesistutorials.com/understanding-genesis-layout-options/

    • This reply was modified 1 year, 7 months ago by  SethResler.
    • This reply was modified 1 year, 7 months ago by  SethResler.
Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.