Title: Custom CSS class?
Last modified: August 21, 2016

---

# Custom CSS class?

 *  Resolved [paddelboot](https://wordpress.org/support/users/paddelboot/)
 * (@paddelboot)
 * [12 years, 8 months ago](https://wordpress.org/support/topic/custom-css-class/)
 * Nice plugin. I can add custom CSS styles, but I cannot define a custom CSS class
   for the widget wrapper. So some of my CSS styles are now in styles.css, some 
   are in the widget’s options field.
 * Please provide us with a possibility to enter a custom CSS class.
 * Thanks,
 * Paddelboot
 * [http://wordpress.org/plugins/posts-in-sidebar/](http://wordpress.org/plugins/posts-in-sidebar/)

Viewing 1 replies (of 1 total)

 *  Plugin Author [Aldo Latino](https://wordpress.org/support/users/aldolat/)
 * (@aldolat)
 * [12 years, 8 months ago](https://wordpress.org/support/topic/custom-css-class/#post-4183135)
 * Open the `functions.php` file of your current theme and look for the function
   that creates the sidebar. For example, in the _Twenty Twelve_ theme you should
   look for this:
 *     ```
       function twentytwelve_widgets_init() {
       ```
   
 * Inside this function change this line:
 *     ```
       'before_widget' => '<aside id="%1$s" class="widget %2$s">',
       ```
   
 * into:
 *     ```
       'before_widget' => '<aside id="%1$s" class="widget my-class %2$s">',
       ```
   
 * I added `my-class`, obviously you’ll type the class you need.
 * Note that this will change the wrapper of **every** widget.

Viewing 1 replies (of 1 total)

The topic ‘Custom CSS class?’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/posts-in-sidebar_aed6f1.svg)
 * [Posts in Sidebar](https://wordpress.org/plugins/posts-in-sidebar/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/posts-in-sidebar/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/posts-in-sidebar/)
 * [Active Topics](https://wordpress.org/support/plugin/posts-in-sidebar/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/posts-in-sidebar/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/posts-in-sidebar/reviews/)

 * 1 reply
 * 2 participants
 * Last reply from: [Aldo Latino](https://wordpress.org/support/users/aldolat/)
 * Last activity: [12 years, 8 months ago](https://wordpress.org/support/topic/custom-css-class/#post-4183135)
 * Status: resolved