Title: Missing widget_text class
Last modified: July 3, 2017

---

# Missing widget_text class

 *  Resolved [Kramarz](https://wordpress.org/support/users/kramarz/)
 * (@kramarz)
 * [8 years, 10 months ago](https://wordpress.org/support/topic/missing-widget_text-class/)
 * Cheers for the plugin.
 * One improvement suggestion.
 * Text widgets in WP get ‘widgets_text’ class added to them by default. And that
   is being used by various themes to style widget’s elements.
 * Your widget is missing that class, so styling for widget elements is missing 
   in many themes.
 * Any chance in adding that class to the widget your plugin generates, please?
 * So it should be this:
 * class=”widget widget_text classic-textwidget”
 * instead of only what we currently have in your widget:
 * class=”widget classic-textwidget”
 * Regards
    Michal
 * P.S.
 * For now I have added it myself by modifying line 20 in class-classic-wp-widget-
   text.php from:
 * `$widget_ops = array( 'classname' => 'classic-textwidget', 'description' => __('
   The classic text widget for arbitrary html or text.', 'classic-text-widget') );`
 * to:
 * `$widget_ops = array( 'classname' => 'widget_text classic-textwidget', 'description'
   => __('The classic text widget for arbitrary html or text.', 'classic-text-widget'));`
    -  This topic was modified 8 years, 10 months ago by [Kramarz](https://wordpress.org/support/users/kramarz/).

Viewing 5 replies - 1 through 5 (of 5 total)

 *  Plugin Contributor [Christina](https://wordpress.org/support/users/carasmo/)
 * (@carasmo)
 * [8 years, 10 months ago](https://wordpress.org/support/topic/missing-widget_text-class/#post-9284266)
 * We don’t want conflicts with a core plugin. It’s very simple to use the class`
   classic-textwidget` in your CSS. Keeping as is.
 *  Thread Starter [Kramarz](https://wordpress.org/support/users/kramarz/)
 * (@kramarz)
 * [8 years, 10 months ago](https://wordpress.org/support/topic/missing-widget_text-class/#post-9284283)
 * Not that simple, as it’s not my CSS, it’s theme css, so occasionally it could
   be problematic to replicate all the styling in child theme, especially for live
   websites.
 * Anyway, I got it sorted for my needs as I mentioned in P.S.
 * Cheers.
 *  Plugin Contributor [Christina](https://wordpress.org/support/users/carasmo/)
 * (@carasmo)
 * [8 years, 10 months ago](https://wordpress.org/support/topic/missing-widget_text-class/#post-9284305)
 * Then you would add the class to the properties or create additional CSS, but 
   using a reserved class from a core plugin coded in php in another plugin is a
   major no-no. A child theme is meant to be changed and the CSS is just icing.
 *  Thread Starter [Kramarz](https://wordpress.org/support/users/kramarz/)
 * (@kramarz)
 * [8 years, 10 months ago](https://wordpress.org/support/topic/missing-widget_text-class/#post-9284355)
 * Ok, never mind me, turns out the fix I done for myself is not enough anyway, 
   as .textwidget class is also needed.
 * Yup much work through child theme re-styling then needed.
 * Still, thanks for the plugin as is.
 *  Plugin Contributor [Christina](https://wordpress.org/support/users/carasmo/)
 * (@carasmo)
 * [8 years, 10 months ago](https://wordpress.org/support/topic/missing-widget_text-class/#post-9284375)
 * I just wrote a filter to add a class without actually changing the plugin, so
   that when the plugin updates, your mods don’t go away.
 * Until that is released, I suggest not using the widget classes and instead use
   a plugin called Widget Classes, then add a class to the widget, and style. It’s
   much easier to use class names that have semantic meaning.

Viewing 5 replies - 1 through 5 (of 5 total)

The topic ‘Missing widget_text class’ is closed to new replies.

 * ![](https://ps.w.org/classic-text-widget/assets/icon-256x256.png?rev=1676091)
 * [Classic Text Widget](https://wordpress.org/plugins/classic-text-widget/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/classic-text-widget/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/classic-text-widget/)
 * [Active Topics](https://wordpress.org/support/plugin/classic-text-widget/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/classic-text-widget/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/classic-text-widget/reviews/)

 * 5 replies
 * 2 participants
 * Last reply from: [Christina](https://wordpress.org/support/users/carasmo/)
 * Last activity: [8 years, 10 months ago](https://wordpress.org/support/topic/missing-widget_text-class/#post-9284375)
 * Status: resolved