Would each of the columns have the same corresponding bootstrap classes (col-sm-4 col-md-4
)? If so, you can just add those classes to the <div>
referenced in before_widget
, like:
register_sidebar(array(
'name' => __('Footer Top', 'roots'),
'id' => 'footer-top',
'before_widget' => '<div class="footer_teaser %1$s %2$s col-sm-4 col-md-4">',
'after_widget' => '</div>',
'before_title' => '<h3>',
'after_title' => '</h3>',
));
But I may have misunderstood what you’re going for. If you need a different class in each widget, might be simplest to just register two different widget areas with different classes applied.
Related Posts:
- Block-based Widgets Editor – how to enable a title
- Can you target a widget_class in a register_sidebar?
- Multiple rows of footer widget areas
- Output column number according to active sidebars
- How to use register_sidebar’s ‘before_widget’ unique id generator into its other parameters like ‘before_title’?
- Dynamic Bootstrap Carousel ID per widget on same page
- Siderbar implementation with collapsible bootstrap cards
- Limit number of Widgets in Sidebars
- How to load Widget javascript + css files only if used?
- check if registered sidebar is active & has widget content
- Adding iframe Content to Sidebar Widget
- How to use wp_dequeue_style() for style enqueued in WP_Widget class
- Storing custom dashboard widget options in wordpress
- Programmatically edit the text of a widget
- How can I whitelist only specific shortcodes for processing in text widgets?
- Create a Widget Area in the Navigation Bar for the Genesis Theme Framework?
- Manual display of widget
- Customized widget area – how to override or filter class xoxo?
- How to access widget data from outside widget?
- Unable to get Alert function to consistently work with backend widget with latest WP
- How to add a description to Widgets?
- Widget options get
- Custom Menus, Widgets & Conditional Statements
- Dynamic widgets
- How do I stop a widget from displaying on mobile site?
- cannot drag and drop widgets since wordpress 3.2.1
- How/where is the global variable $wp_registered_widgets filled?
- Converting a WordPress widget to a block
- Change recent posts widget title
- Color Picker Showing Twice When Widget Added to Sidebar
- Widget modifications in a child theme
- How to get “Widget Logic” plugin’s input value in a custom widget code (to display on the Widget admin page)
- Extending WP_Widget throws error when Monster Widget used
- Custom html widget with a Joomla-style assigment
- Is there a way to extend the default image widget into a new custom widget and add additional fields to it?
- Conditional Tags Based on Previously Viewed Posts
- Make page jumps in widget
- Query in query for Widget
- How to display first post thumbnail as a background image of a widget?
- Widget without DIV wrapper
- Widgets not displaying since 4.3
- Custom widget with WYSIWYG
- Limit number of widgets in widget area
- How to create pagination for homepage with widgetized area?
- Hooking action once but called twice
- How can I add an author-box below a post?
- How to overload the update() of existings widgets?
- Override WordPress Widget CSS Classes?
- Help me out with this Undefined index ?
- displaying tags in a widget
- Dynamic Sidebar and XHTML Validity?
- How to use wordpress content class?
- How to use get_results() in widget front end?
- How to best include widget area just on homepage?
- Remove “Content” and “Discussion” from Right Now Dashboard Widget
- wordpress widgets screen disappeared
- Different widgets in sidebar on sub-children pages?
- Can the qTranslateX-Plugin translate non-article text? [closed]
- Custom widget is not appearing in the admin area
- Static image for embedded YouTube video instead of blank player?
- Removing side bar widgets from GovPress theme
- What conditional to use for dynamic sidebar check?
- How to test if the widgetized area has any widgets?
- Saving widget gets an undefined variable
- Trouble accessing a multidimensional array to add classes to default WordPress widgets
- Distinguish between different widgets of the same type
- links to Media Library content in sidebar per page
- Why is registering a sidebar for each page causing my sidebars to reset?
- How do I customize the positioning of WordPress widgets?
- widgets in footer?
- Quick Draft widget in weird place on dashboard after being re-added
- How can I remove WordPress element IDs and Class names in the HTML?
- Remove widgets on mobile front page without affecting desktop
- Widget display nothing
- How can I have sidebar widgets on Twenty Seventeen theme on all pages?
- Collapsible widgets [closed]
- Loop through Widgets in sidebar using widget array number?
- Widget settings disappear after refresh
- How to display author meta in a sidebar widget
- Is it ok not to set widget in the main page of a one page WordPress Theme?
- How to get widget content in WordPress based on it’s ID?
- Recent Posts Widget URL / Domain change
- New Custom Widget Call a Different Widget Function
- Loading scripts only if a particular shortcode or widget is present
- Always show the widget title in a wordpress widget
- Custom php Widget keeps disappearing from the front end
- Display Posts by Views (Popular Posts Widget)
- Insert to wp_footer if widget is found in the sidebar
- Using javascript on the new widget preview / customizer page
- Conditionally enable autoplay when using oEmbed in a custom widget
- List.js inside WordPress widget
- Show or hide custom menu widget in side bar conditionally
- Custom tabs widget don’t work in google chrome, is blocked, do not change the tabs. Why?
- WordPress Hide Widget If $_Session Is Active?
- Widget which displays thumbnails, but links to urls?
- What are the downsides of using bootstrap in plugin development?
- Recent posts with different class name for each post and a scrollbar?
- Problem on register/login widgets
- Classic widgets with 5.9+?
- Unable to add options on dashboard widget ?