WordPress.org

Ready to get started?Download WordPress

Forums

Remove div class=textwidget without hacking core (3 posts)

  1. Treebeard
    Member
    Posted 1 year ago #

    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

    thanks!

  2. bcworkz
    Member
    Posted 1 year ago #

    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.

  3. Treebeard
    Member
    Posted 1 year ago #

    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.

    :(

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.