• 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

How to Remove Sidebar Markup

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 › General Discussion › How to Remove Sidebar Markup

This topic is: resolved

Tagged: genesis_sidebar, Sidebar

  • This topic has 5 replies, 2 voices, and was last updated 11 years, 1 month ago by Brad West.
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • December 1, 2014 at 4:24 am #133308
    Brad West
    Member

    I'm trying to reposition my sidebars, but I can't remove the sidebar markup, <aside class=sidebar ...>. It seems like the follow should work, but it's not.

    remove_action( 'genesis_sidebar', 'genesis_sidebar_markup_open' );
    remove_action( 'genesis_sidebar', 'genesis_do_sidebar' );
    remove_action( 'genesis_sidebar', 'genesis_sidebar_markup_close' );

    or maybe

    remove_action( 'genesis_sidebar', 'genesis_do_sidebar_markup_open' );
    remove_action( 'genesis_sidebar', 'genesis_do_sidebar' );
    remove_action( 'genesis_sidebar', 'genesis_do_sidebar_markup_close' );

    remove_action( 'genesis_sidebar', 'genesis_do_sidebar' ); is removing the content, but how can I remove the markup?

    December 1, 2014 at 5:46 am #133312
    Genesis Developer
    Member

    This markup is coming from sidebar.php file. You can do this

    1. Create a new sidebar.php file
    2. Add the custom php code as per your requirement
    3. Now upload this new file in your child theme folder

    Hope that this new file will overwrite the parent's sidebar.php file.


    Download Genesis Featured Posts Combo Widget | Simple Grid Layouts Plugin for Posts, CPTs and terms
    You can request new tips/help.

    December 1, 2014 at 8:59 pm #133383
    Brad West
    Member

    The content of the current file is fine. I just want it to display in a different place. Creating a new file wouldn't solve that, would it? The original <aside class=sidebar ...> code will still be output, no?

    December 1, 2014 at 9:47 pm #133392
    Genesis Developer
    Member

    Can you provide the site URL? Where will you display the sidebar? Sidebar will come after the content area?


    Download Genesis Featured Posts Combo Widget | Simple Grid Layouts Plugin for Posts, CPTs and terms
    You can request new tips/help.

    December 2, 2014 at 8:32 pm #133471
    Brad West
    Member

    It's being developed locally on my computer. There is no URL yet.

    Typically you have the following layout:

    <div class="content-sidebar-wrap">
    <main class="content" ...>
    <aside class="sidebar sidebar-primary ...>
    </div>
    <aside class="sidebar sidebar-secondary ...>

    I'd like to move the main and two asides inside the same area. Something like this:

    <div class="content-sidebar-wrap">
    <main class="content" ...>
    <aside class="sidebar sidebar-primary ...>
    <aside class="sidebar sidebar-secondary ...>
    </div>

    or like this, removing the content-sidebar-wrap:

    <div class="site-inner">
    <header class="entry-header ...> ... </header>
    <main class="content" ...>
    <aside class="sidebar sidebar-primary ...>
    <aside class="sidebar sidebar-secondary ...>
    </div>
    December 2, 2014 at 8:42 pm #133472
    Brad West
    Member

    I finally got it. Seems simple now:

    remove_action( 'genesis_after_content_sidebar_wrap', 'genesis_get_sidebar_alt' );
    add_action( 'genesis_after_content', 'genesis_get_sidebar_alt' );

    This moved the secondary sidebar inside the content-sidebar-wrap like this:

    <div class="content-sidebar-wrap">
    <main class="content" ...></main>
    <aside class="sidebar sidebar-primary ...></aside>
    <aside class="sidebar sidebar-secondary ...></aside>
    </div>
  • Author
    Posts
Viewing 6 posts - 1 through 6 (of 6 total)
  • The topic ‘How to Remove Sidebar Markup’ is closed to new 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