Your theme, your sidebars and the plugin & overriding
-
One of the new features is as a default setting is that the plugin will try have your current themes first sidebar styling apply to the widgets inserted into a page via the shortcode.
Many folks requested this, insisting that absolutely this is what should be happening and why didn’t it? Well..This could be great – Imagine: a plugin that can pick up the theme styling and change it as your theme changes.
The success of this depends very much on how your theme specifies it’s css. Does it always use classes ? – more css will apply. Does it lock the css down by sidebar-id: that css will not apply.
It also depends on what the original widget plugin does with css and js. It may have done something thinking that the widget will always be inside a sidebar and not anticipated being in a page. This the shortcde-any-widget plugin has no control over.
For example: An unwanted effect could be white text on a white background as in the twenty fourteen theme.
If you have an undesired effect with the default setings:
You need to learn the joys of the ‘inspect element’ tools in various browsers or browser web developer, firebug add-ons, so you can see what css is applying to what html. Then you can either change some of the html or override or change the css.
Options if you don’t like the default result:
Use the ‘amr-widget’ class that has been added to the widget wrapping html to override any css.
eg:
.amr-widget [
color: #000000;
}Tap into a class you already have in your theme:
[do_widget class=yourclass]
Change the html that the shortcode-any-widget plugin will use.
eg: don’t like the h3.widget-title styling ? change the title html to h2 in the shotcode parameters
[do_widget title=h2]
eg: don’t like the ‘aside’ wrapping html styling? change the wrapping html:
[do_widget wrap=div]
If you only using widget, maybe inserting the whole sidebar or widgertarea would give an interesting effect. Sidebar background css may apply.
[do_widget_area]
- The topic ‘Your theme, your sidebars and the plugin & overriding’ is closed to new replies.