treehouse : what would you like to learn today?
Web Design Web Development iOS Development

WordPress Sidebar Widget

  • I am making a WordPress theme and currently tackling the sidebar. One of the widgets in the sidebar has an image advertisement. Currently this is happening: http://cl.ly/MFjT. I styled all the widgets so they have a white background and border. But, for this advertisement I don't want to show the background, border, or have padding. Is there any way to stop this from happening besides using the ID WordPress gives for each widget?

  • Hmm, I am not really 100% sure I understand what you mean, but can't you simply wrap that widget in div tag in your theme, or does the widget not generate classed, which can be themed?

  • You can either use the ID WordPress generates or add the code for the advertisement to your sidebar.php file. I believe, in the second case, the advertisement would have to come before or after the dynamic sidebar that is generating the widgets.