• 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

Adding Extra Sidebars

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 › Adding Extra Sidebars

This topic is: resolved

Tagged: add a sidebar

  • This topic has 7 replies, 3 voices, and was last updated 11 years, 11 months ago by ZAAAX.
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • November 19, 2014 at 2:55 pm #132195
    ZAAAX
    Member

    Hi there, I'm trying to add an extra Primary sidebar, or at least another sidebar so I can select different sidebars for different pages / post.

    I found the primary sidebar making code in Genesis: Sidebar (sidebar.php) as per below

    //* Output primary sidebar structure
    genesis_markup( array(
    	'html5'   => '<aside %s>',
    	'xhtml'   => '<div id="sidebar" class="sidebar widget-area">',
    	'context' => 'sidebar-primary',
    ) );

    So I figure if I add the same code slightly edited, there should be another sidebar appearing named secondary .... right?

    Code would be .....

    //* Output secondary sidebar structure
    genesis_markup( array(
    	'html5'   => '<aside %s>',
    	'xhtml'   => '<div id="sidebar-secondary" class="sidebar widget-area">',
    	'context' => 'sidebar-secondary',
    ) );

    Can someone please let me know if I'm on the right track?


    Crisp!

    ZAAAX Design

    http://redscooter.zaaax.com.au/
    November 19, 2014 at 3:01 pm #132196
    nunotmp
    Member

    The code you created above is not for a sidebar this is a genesis function to output proper HTML for HTML5 sites. You need to use this

    
    genesis_register_sidebar( array(
    	'id'          => 'sidebar-id',
    	'name'        =>  'Sidebar Name'),
    	'description' =>  'This is the description.',
    ) );
    

    Paste this into your functions.php file and edit it to fit your needs.


    Genesis Child Themes – Follow Me

    November 19, 2014 at 3:08 pm #132198
    Lauren @ OnceCoupled
    Member

    If you're still having trouble, it might be more helpful for you to post what you're trying to achieve. Then we can let you know if there's a better way to go about this in the first place. 🙂

    Best,
    Lauren


    We create mobile-first, PageSpeed-optimized, pixel-perfect custom themes! https://www.oncecoupled.com

    November 19, 2014 at 3:21 pm #132202
    ZAAAX
    Member

    Ok tried that code and replaced some bits to suit ... like this

    genesis_register_sidebar( array(
    	'id'          => 'sidebar-secondary',
    	'name'        =>  'Sidebar Secondary'),
    	'description' =>  'This is the description.',
    ) );

    And then got a parse error with no site displaying at all.

    I placed the code into the functions.php of the theme Executive Pro. So what did I do wrong?


    Crisp!

    ZAAAX Design

    November 19, 2014 at 3:26 pm #132204
    ZAAAX
    Member

    Hi Lauren, thanks.
    Just wanting to add an extra sidebar so I can use the simple sidebar plugin to allocate which sidebar to display with different pages.


    Crisp!

    ZAAAX Design

    November 19, 2014 at 3:34 pm #132211
    nunotmp
    Member

    Sorry about that. On the line that says 'name' => 'Sidebar Secondary') there is a parenthesis. Removed below

    
    genesis_register_sidebar( array(
    	'id'          => 'sidebar-secondary',
    	'name'        =>  'Sidebar Secondary',
    	'description' =>  'This is the description.',
    ) );
    

    Genesis Child Themes – Follow Me

    November 19, 2014 at 4:20 pm #132220
    ZAAAX
    Member

    Ok looks like that code worked @nunotmp

    Only problem is now tho, when I go to a page from Admin to edit or select the sidebar with simple sidebar plugin there's no other sidebar option to select except the primary one.

    I've linked an image for you to check out if you want.

    Image Of No Sidebar Options in Simple Sidebar


    Crisp!

    ZAAAX Design

    November 19, 2014 at 5:36 pm #132227
    ZAAAX
    Member

    LOLOL, ok maybe I'm one of those people who calls Microsoft Support moaning about how the computer doesn't work even tho there's a power outage and I'm told to pack it back into the box cos I'm too dumb to own one, is possible I guess.

    I say this cos I just found the Simple Sidebar plugin creator which I didn't see before under the Genesis tab in the Admin Menu.

    Sheesh, talk about embarrassment & my face is red!

    😉


    Crisp!

    ZAAAX Design

  • Author
    Posts
Viewing 8 posts - 1 through 8 (of 8 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

© 2026 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