Simply edit your theme functions.php file,
find :
register_sidebar function
check out the name attribute in the function to make sure which widget you are going to update
There should be an attribute called before_widget
you can define your custom CSS Class name into it
here is the sample code for your reference
register_sidebar( array(
'name' => __( 'News Sidebar', 'left-test-sidebar' ),
'id' => 'sidebar-1',
'description' => __( 'Add widgets here to appear in your sidebar.', 'depnet' ),
'before_widget' => '<section id="%1$s" class="widget %2$s YOUR-CUSTOM-CSS-CLASS">',
'after_widget' => '</section>',
'before_title' => '<div class="widget-title YOUR-CUSTOM-CSS-CLASS"><h4>',
'after_title' => '</h4></div>',
) );
Related Posts:
- Custom Widget function in Plugin not working?
- Adding Widget form fields dynamically
- What is the correct way to build a widget using OOP
- Widget development – Drop down options won’t save
- Calling the widget id of a mult-instance widget from inside the widget?
- Is There A Hook To Process The Content Of The Text Widget?
- Add content to widget title in admin area within the widget?
- Has anyone managed to integrate the wp_editor inside a widget?
- Help adding image upload functionality to widget
- Using preg_replace to clean widget output HTML
- Edit the output of wp_widget_rss_output()
- Script to remove all inactive widgets?
- Possible to preset a widget’s contents via a plugin script?
- Multiple entries in get_option results? or why is _multiwidget set to 1?
- How to add multiple copies of a widget from “available widgets”
- Install widget on plugin activation
- Using Ajax call in jQuery doesn’t work in widget
- WordPress select dropdown list in widget
- Using $wpdb object in a widget
- Is there a need to do apply_filter(‘widget_title’, $instance[‘title’]) or any other ‘widget_xxx’ filters?
- Dynamic content in a widget
- How to pass custom options from widget form to widget update callback?
- Broken markup when using the_excerpt() in a widget?
- Tips for targeting widget dragable for WP Pointer on widgets.php page
- PHP 7 – Class Method Compatibility Issue
- Widget Admin – Form Submit Event?
- How to save WP widget instances and options
- Can I individually style items in the backend widget list?
- Sidebar widget to show popular post not working?
- Widget update function not saving values
- Add custom element ID depending where the widget place is, sidebar or footer
- Customizer: widget-synced triggers twice
- Add a class to a dynamic sidebar’s wrapper
- Widget is to be compatible with all themes
- Widget Dropdown doesn’t working
- How do I get the sub categories of the parent when in a sub category?
- How to limit number of number of categories displayed by categories widget
- Input in plugin widget does not allow spaces
- Get draggable widgets on Edit Post page
- Dynamically creating classes for Widget API
- Widget options are not updated
- Why does my widget break other widgets?
- CSS not affecting widget output
- Using a multiple element in widget form
- Problem with saving checkbox values with WordPress Widget API
- Are there any official or unofficial guidelines for the styling of a widget?
- Create Widget or Enable Shortcodes in Sidebar
- Minimum Widget Width for Plugin Development
- How to create a wordpress widget that dynamically changes according to the page
- WordPress dynamic widget by location?
- Can / should a widget plugin define its own Widget Area?
- How to exclude categories from get_categories() select list inside a widget admin panel
- Widget internal hooks and functions
- My plugin creates custom widgets, How can I programatically add them to existing sidebar widget areas?
- How to show multiple instances of the WP125 Widget?
- Console errors in 6.0-RC1 Widget screen
- Error code when migrate
- How does update method in Widget class saves $instance array from Select tag?
- Quick Draft widget (dashboard.php) using custom post_type
- Uncaught Error: Call to undefined function wp_get_current_user() in
- Load script on frontend from widget plugin
- Can’t get wpColorPicker to work in a widget
- If user is logged-in display/hide widgets ( siteorigine) [closed]
- Set widget icon in Customizer?
- How to embed or integrated a custom WordPress Widget into the theme?
- Widget won’t be activated
- Dynamic sidebar areas not working on the Theme Customizer
- Downloading Generated XML File
- Detect each active instance of a widget
- wp_register_sidebar_widget in loop within a plugin?
- grouping my widgets wordpress
- Get fields of a widget
- How do I create Widget within plugin that uses its own class?
- Best practice to include custom user styles in widgets
- How to specify widget order or css name via script?
- Is it possible to add Custom Dashboard Widgets to Custom Admin Menu Page?
- Is there any way to test if a function running only on plugin update is successfully running?
- Hook for post permalink update
- Load page template with custom content using a plugin
- Sharing a common set of image files for media library, across all sites within multisite
- How do I alter the comment form ‘allowed tags’ text in a plugin?
- Create onClick Event to Re-load a Widget
- How to create database table, add data, update and delete using wpdb via plugins?
- Extending theme PHP class in plugin
- Any ideas to trigger some code after plugin update?
- How to test plugin update through WordPress plugin updater without tagging new release in the repo
- hook filter after the_content on a specific page
- Add user managable titles to custom menus?
- WP_Query order posts by category
- How to override supports of innerBlocks?
- Implications of creating a plugin that adds functionality to other developer’s plugin?
- why is update_user_meta creating arrays when trying to change the same value?
- Add WordPress Meta Box saved form input to WordPress RSS feed [duplicate]
- What should I use instead of get_blog_option?
- Children Shortcodes?
- Ajax functions – no access to wp-admin.php only online
- Shortcode rendered in preview, but empty in post
- get_the_tags($ID) is empty during publish_post callback
- Event when Modal is opened/visible
- Can a WordPress plugin add read-only pages?