• 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

Remove .sidebar-primary in footer

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 › Remove .sidebar-primary in footer

This topic is: resolved

Tagged: remove sidebar

  • This topic has 7 replies, 3 voices, and was last updated 9 years, 10 months ago by naveenkarolla.
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • June 8, 2016 at 5:56 pm #187203
    mocca
    Member

    Hi!

    I want to remove the primary sidebar <aside> in the footer.

    Markup:

    <footer class="site-footer" itemscope="" itemtype="http://schema.org/WPFooter">
    <div class="wrap">
    
    <aside class="sidebar sidebar-primary widget-area" role="complementary" aria-label="Primary Sidebar" itemscope="" itemtype="http://schema.org/WPSideBar" id="genesis-sidebar-primary">
    <h2 class="genesis-sidebar-title screen-reader-text">sidebar</h2>
    </aside>	
    
    <p class="left">Lorem Ipsum</p>
    <p class="right">Lorem Ipsum</p>
    </div>
    </footer>
    

    But this code

    remove_action( 'genesis_sidebar', 'genesis_do_sidebar' );

    … doesn’t remove the surrounding markup <aside …><h2>Sidebar</h2></aside>. I want to get rid of the <aside>…</aside> and everything in between.

    In genesis/sidebar.php is this code:

    do_action( 'genesis_before_sidebar_widget_area' );

    do_action( 'genesis_sidebar' );

    do_action( 'genesis_after_sidebar_widget_area' );

    If I change do_action in remove_action (in my functions.php) nothing happens:

    remove_action( 'genesis_before_sidebar_widget_area' );
    
remove_action( 'genesis_sidebar' );  // this only removes the <div class=”widget widget_text“> 

    remove_action( 'genesis_after_sidebar_widget_area' );

    What make I wrong?

    June 9, 2016 at 5:13 pm #187275
    Victor Font
    Moderator

    Why not just unregister the sidebar?

    unregister_sidebar( 'sidebar' );


    Regards,

    Victor
    https://victorfont.com/
    Call us toll free: 844-VIC-FONT (842-3668)
    Have you requested your free website audit yet?

    June 10, 2016 at 3:48 am #187313
    mocca
    Member

    Oh, I didn't write that I had also unregistered the sidebar already. But that didn't work - but should (if you suggest it). If the code above is correct the mistake must be somewhere else.

    June 10, 2016 at 5:47 am #187323
    Victor Font
    Moderator

    Placing the sidebar in the footer is very unusual. Whomever placed the sidebar in the footer should have done so in functions.php. It's also possible they created their own footer.php. Without access to the site, or at least to a gist of functions.php, it's impossible to tell you what's happening.


    Regards,

    Victor
    https://victorfont.com/
    Call us toll free: 844-VIC-FONT (842-3668)
    Have you requested your free website audit yet?

    June 11, 2016 at 3:25 pm #187391
    mocca
    Member

    In the meantime I tried to find out which part in the functions.php moves the sidebar within the site-footer. It’s the code in the footer section (line 133ff). I want to move the site-footer div and the footer-widget div into the site-container with this code. When I delete the code in this footer section of my functions.php the sidebar is placed between the site-container and the footer-widget div. It doesn’t disappear but only changes its position.

    The only thing I want to do is to remove it. I don’t know why it’s so persistent.

    These two lines don't help:

    unregister_sidebar( 'sidebar' );
    unregister_sidebar( 'sidebar-alt' );

    This is the link to the functions.php: https://www.dropbox.com/s/qyaf9d23er6bpbr/functions.php?dl=0
    Screenshot of the DOM: https://www.dropbox.com/s/saespxdilcftki8/Bildschirmfoto%202016-06-11%20um%2023.16.28.jpg?dl=0

    It would be great if you could take a look on it.

    June 11, 2016 at 5:16 pm #187397
    Victor Font
    Moderator

    There's nothing in the functions file to cause this. When I compare your source code to one of my sites, I can see a clear difference. On my site there is an id="genesis-sidebar-primary" in the sidebar aside. This ID is missing in your code which leads me to believe it is not generated by Genesis. Have you looked at text widgets in the footer or the Genesis Simple Edits plugin for the hard coded source?


    Regards,

    Victor
    https://victorfont.com/
    Call us toll free: 844-VIC-FONT (842-3668)
    Have you requested your free website audit yet?

    June 11, 2016 at 6:02 pm #187401
    mocca
    Member

    Oh, I have this id also. It was just cropped in the screenshot.

    As you couldn't find a mistake in the functions.php I searched the error somewhere else. Finally I found it in the WP admin 🙂 The default layout was set to the one with the sidebar. I changed the setting to full page et voilà 🙂

    Thank you very much for your support, Victor!!!

    June 12, 2016 at 9:16 pm #187455
    naveenkarolla
    Member

    if you are using wordpress platform.. go to the Appearance>>Editor and then your theme editor code will be appeared.. on the right side, click on the side bar.. then removie all the coding there... :

  • Author
    Posts
Viewing 8 posts - 1 through 8 (of 8 total)
  • The forum ‘General Discussion’ 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