Community Forums › Forums › Archived Forums › Design Tips and Tricks › Possible to remove primary sidebar on Education theme?
- This topic has 7 replies, 2 voices, and was last updated 10 years, 11 months ago by
DigitalC.
-
AuthorPosts
-
May 20, 2014 at 9:26 am #106023
DigitalC
MemberI've tried a bunch of CSS but haven't yet had luck... I really like the secondary sidebar in blue but the primary one feels like overkill. I know I can get rid of the secondary one in the theme settings but I feel like that loses a nice design element. So I was wondering if there is a way to get rid of just the primary sidebar? Thanks for your help!
May 20, 2014 at 11:02 am #106035nutsandbolts
MemberYou can remove it by adding the following function to your functions.php file:
//* Unregister primary sidebar unregister_sidebar( 'sidebar' );
Andrea Whitmer, Owner/Developer, Nuts and Bolts Media
I provide development and training services for designers • Find me on Twitter and Google+May 20, 2014 at 11:13 am #106041DigitalC
MemberThanks for your quick response, however when I add that to the functions file it removes what's "in" the sidebar but not the sidebar itself. It is also removed from the admin widget area but on the website itself it shows the WP default:
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.
I tried adding it to both the Genesis functions and to the child theme functions with the same effect. Thoughts?
May 20, 2014 at 11:19 am #106043nutsandbolts
MemberHmm, that's very strange. It should remove the sidebar completely... What do you have set as the default layout? It may be necessary to switch primary and secondary sidebars so that the secondary shows where the primary belongs.
This tutorial should help you: http://www.carriedils.com/genesis-theme-tutorial-primary-sidebar/
Andrea Whitmer, Owner/Developer, Nuts and Bolts Media
I provide development and training services for designers • Find me on Twitter and Google+May 20, 2014 at 11:59 am #106051DigitalC
MemberSo this is interesting... I just realized that it's only in Safari where it's happening and apparently it's me because I had someone else test in Safari and it doesn't happen for them. I cleared out my cache to no avail, but your function seems to have removed the sidebar completely. Sorry about that!
The remaining issue is the big white empty space where the sidebar was. I tried changing the CSS as per the tutorial and that works on desktop but then it doesn't on mobile (cuts off the right half of the page).
I realize that's a separate question but if you have any thoughts on that I would appreciate it!
May 20, 2014 at 12:11 pm #106052DigitalC
MemberNever mind I think I finally got it! I think I was targeting the wrong element. Seems to be working perfectly now except in my broken Safari 🙂 Thanks so much!
May 20, 2014 at 5:02 pm #106088nutsandbolts
MemberNo problem! I’ve marked this topic as resolved for now, but feel free to open a new topic if you run into issues. 🙂
Andrea Whitmer, Owner/Developer, Nuts and Bolts Media
I provide development and training services for designers • Find me on Twitter and Google+May 20, 2014 at 5:48 pm #106100DigitalC
MemberFor anyone else's info, I finally learned that the reason I was seeing the sidebar is because (for whatever reason) it shows up when you're logged in. So logged in, I got that "primary sidebar widget" default that WordPress puts there. But once I logged out it was gone.
-
AuthorPosts
- The forum ‘Design Tips and Tricks’ is closed to new topics and replies.