Archived topic
Phantom widgets in empty left sidebar
8 replies · Started by Harvey on February 22, 2017
I'd like to have an empty space to the left of posts on the blog page. I'd thought I could achieve that by adding an empty left sidebar. No luck. Even though I've haven't added any widgets to the left sidebar, there are two I can't get rid of (Search and Posts Archive). Curious.
As I'm composing this, I realize that wasn't really what I wanted. Right now, the Posts page (my Home page) is configured Content/Right Sidebar, so that the posts are down the left center of the page. I'd like the ability to move the left edge of on the Content block to the right, thus letting the background color of the page appear.
Hi Harvey,
When there’s nothing in your sidebar, some default widgets show up in there to fill the empty space (Archives, Search etc..) as fallbacks.
Are you able to provide a link to the page?
Let me know.
Is filling in default widgets a default WP setting? Or peculiar to GP? I'm asking out of idle curiosity.
Back to my real question: I've just changed from one computer to another and discovered that on a wide screen, there is a blank area to the left of the center content area (where the posts are). It's only when the screen is sufficiently narrow that the the center content area moves to touch the left edge of the screen. Is there somewhere in the Customizer that I can specify a minimum amount of space to the left of the content area on desktop screens.
The page in question: https://dev.avec33.fr/
Try changing the Container Width in Customizer > Layout > Container?
Let me know if that's what you are after.
The default widgets are actually in GP.
I'll actually consider removing them completely, although that would result in a completely empty space.
A better solution in my opinion is to make it like the footer widgets but with a link to theme docs on how one can place an empty text widget if one wishes to have a sidebar but dont want to show anything.
Sorry to hijack the topic Harvey
Tom: How about giving site developers the ability to remove the default widgets if for some reason they want to?
Leo: Hmmm...that's exactly what I wanted. However, I'd like to point out I was confused by the terminology in the Customizer. Under Sidebars I can choose where the Sidebars are in relation to Content, i.e., the center column. However, under Container something called Content Layout allows me to meld the Sidebars into Content visually. I was no longer clear as to what Container and Content mean. I think renaming Content Layout as Container Layout would reduce confusion. Perhaps, at least for newbies like me.
Jamal: Hijack? Hmmmm...hardly. Excuse the cliché, but we're smarter collectively.
You could create a new file in your child theme root directory called sidebar-left.php and add this code to it: https://gist.github.com/generatepress/bf7eaa46279da3a7dd2b8b095b30a6d6
That will remove the default widgets from the sidebar :)