- This topic has 1 reply, 1 voice, and was last updated 6 years, 1 month ago by .
- The topic ‘Unregister sidebar still shows standard sidebar output’ is closed to new replies.
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.
Hi all. I just have a quick question that I´ve been encountering with Studiopress themes.
If you make a theme or activate a theme for development. Then decide that you don´t want any sidebars in said theme and you place
//* Remove sidebars unregister_sidebar( 'sidebar-alt' ); unregister_sidebar( 'sidebar');
in your functions.php file like I´ve done over at my quickly pulled together placeholdertheme I´m using on http://deculture.se and when I check the sourcecode I still get
<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>
<aside class="sidebar sidebar-secondary widget-area" role="complementary" aria-label="Secondary Sidebar" itemscope="" itemtype="http://schema.org/WPSideBar" id="genesis-sidebar-secondary"><h2 class="genesis-sidebar-title screen-reader-text">sidebar-alt</h2></aside>
And this is starting to irritate me without no end. As admin I don´t want to see
"Primary Sidebar Widget Area
This is the Primary Sidebar Widget Area. You can add content to this area by visiting your Widgets Panel and adding new widgets to this area." whenever I visit the page as it should have no reason to exist. And no matter what I do I can not get this to dissapear. Which is starting to turn mem off from Genesis a bit.
If it´s as simple as checking something in the Genesis settings then please do let me know. Then I can feel stupid and get on with everything else.
Thanks for your time,
Issue solved. Thanks to me not placing
//* Force full-width-content layout add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_full_width_content' );
in the functions.php file it still outputed the sidebar code. So not just unregistering the layout options was enough to stop this from happening. I had to manually remove the unregister layout options and then choose fullwidth in Genesis settings to get it working. Then I could add the forcing of fullwidth to my functions php and add on the unregister layout code.
So issue solved. Now the website just need to update it´s cache which will take like 20 hours currently.
© 2022 WPEngine, Inc.