• Skip to main content
  • Skip to forum navigation

StudioPress

  • Shop for Themes
  • My StudioPress

Forum navigation

  • Home
  • General Genesis Discussions
  • StudioPress Themes
  • Genesis Blocks
    • Genesis Blocks
    • Genesis Custom Blocks
  • Retired Themes
  • FAQs
  • Forum Rules
  • Internationalization and Translations
  • Forum Bugs and Suggestions
  • Forum Log In

Are You Using The WordPress Block Editor?

Genesis now offers plugins that help you build better sites faster with the WordPress block editor (Gutenberg). Try the feature-rich free versions of each plugin for yourself!

Genesis Blocks Genesis Custom Blocks

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

Welcome!

These forums are for general discussion on WordPress and Genesis. Official support for StudioPress themes is offered exclusively at My StudioPress. Responses in this forum are not guaranteed. Please note that this forum will require a new username, separate from the one used for My.StudioPress.

Log In
Register Lost Password

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

This topic is: not resolved

Tagged: layout, Sidebar

  • This topic has 5 replies, 2 voices, and was last updated 10 years ago by SethResler.
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • May 4, 2013 at 12:52 am #39217
    SethResler
    Participant

    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!

    May 4, 2013 at 8:03 am #39237
    Susan
    Moderator

    Try this tutorial by Carrie Dils:

     

    Genesis Theme Tutorial: Get Rid of the Primary Sidebar (but Keep the Secondary!)

    May 4, 2013 at 9:43 am #39255
    SethResler
    Participant

    Thanks, that was very useful!

    May 4, 2013 at 11:32 am #39279
    SethResler
    Participant

    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?

    May 7, 2013 at 12:13 am #39669
    SethResler
    Participant

    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!

    May 7, 2013 at 1:26 am #39679
    SethResler
    Participant

    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/

  • Author
    Posts
Viewing 6 posts - 1 through 6 (of 6 total)
  • The forum ‘Design Tips and Tricks’ is closed to new topics and replies.

CTA

Ready to get started? Create a site or shop for themes.

Create a site with WP EngineShop for Themes

Footer

StudioPress

© 2023 WPEngine, Inc.

Products
  • Create a Site with WP Engine
  • Shop for Themes
  • Theme Features
  • Get Started
  • Showcase
Company
  • Brand Assets
  • Terms of Service
  • Accptable Usse Policy
  • Privacy Policy
  • Refund Policy
  • Contact Us
Community
  • Find Developers
  • Forums
  • Facebook Group
  • #GenesisWP
  • Showcase
Resources
  • StudioPress Blog
  • Help & Documentation
  • FAQs
  • Code Snippets
  • Affiliates
Connect
  • StudioPress Live
  • StudioPress FM
  • Facebook
  • Twitter
  • Dribbble