How can I remove WordPress element IDs and Class names in the HTML?


Very much following this advice for body class:

I’d like to remove the IDs and Classes that WP automatically ads to all its elements.

Someone has posted how to do this with menu items: wp_nav_menu remove class and id from li

But I can’t figure out a way to do it for say, custom HTML widgets, or text widgets, which produce an ID for each one that is created or added to a site –> it seems unnecessary since other classes control these areas.

Also asked this question about the parent page IDs

Trying to reduce all the added CSS and HTML references to help with site speed…hopefully.

joycegrace 2 months 0 Answers 13 views 0

Leave an answer