Archived topic
sidebar images
5 replies · Started by Anonymous on August 25, 2014
I would like to have different images appear at the top of my sidebars on each page of my website. Is this possible using the Background image add-on?
In my experience the background image spreads over all the widgets in the sidebar as if one image is behind several windows. It looks really nice. But if I understand what you are describing, I'd put the image I wanted in a widget at the top of the sidebar and then style that widget to have a transparent background and no margins or padding. For example:
#right-sidebar #text-5 {
background: transparent !important;
margin: 0,0,20px,0 !important;
padding: 0 !important;
}
If you don't really want it in the sidebar widgets but in the container, I'm sure Tom will have great advice.
Hi Pam,
Would these be background images, or just images inside widgets?
To make a widget appear on specific pages, I like to use this plugin: https://wordpress.org/plugins/display-widgets/
Dee's code above would work to remove the spacing around the specific widget, minus the #right-sidebar.
So it would look like:
#text-5 {
padding: 0;
}
Of course, #text-5 would have to match that specific widget (they all get different numbers generated).
Let me know if this helps at all :)
They would be images inside of the widgets, positioned at the top, over the copy. Thanks!
Pam, that's what is happening here http://www.dbepub.com. All of the book covers are widgets that are styled the way I said above. Of course, as Tom points out my code is overkill. Can you tell I'm not a coder? :)
It also works to just put an image link in GP Hooks, Before [Right or Left] Sidebar Content, which might be easier if you are only doing one or two. I did that with the social media icons here. http://www.elt.international
In addition to the plugin Tom recommended, I use Widget Context to put widgets where I want them. Works great with GeneratePress, too.
Best of luck!
Hi Pam,
Were you able to figure this out? :)
Thanks for the help, Dee! It's appreciated :)