Support » How-To and Troubleshooting » Remove div class=textwidget without hacking core

Remove div class=textwidget without hacking core

  • I’ve been searching for hours and I can’t find anything on how to remove that dumb style without hacking the core. Is there a function I can add that would remove that div class from all text widgets? I can’t style it because I use widget areas for different areas all over the page, so I’d like to just get rid of that div class if that’s possible.

    Anyone know how to do this from the functions.php file?

    *fingers crossed


Viewing 2 replies - 1 through 2 (of 2 total)
  • If you remove or override all related CSS, it does nothing being there, why remove it?

    If you must, you need to register your own text widget, then go into your backend and replace all instances with your version.

    Alternately, you could reassign the class with javascript or jquery.

    I’d override the CSS as usual, but this time, it’s not validating because I have CSS around it that’s conflicting, one of the widgets is a paragraph tag, so there’s a p tag with a div inside it, just weirdness.

    And I would gladly update core files, but it’s not my website so once the client updates, the widgets will all break.


Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Remove div class=textwidget without hacking core’ is closed to new replies.