Remove classes, such as class="entry" (3 posts)

  1. pixelhub
    Posted 5 years ago #


    I'm sure this has been asked before (and i have searched), but i just can't find a solution.

    I was wondering how you remove all the classes that wordpress adds to the code such as

    class="page_item page-item-2"

    and so on...

    I know you can edit some core files like wp-includes/classes.php and wp-includes/category-template.php but is there an easier way, like a plugin of a bit of code that will remove the classes.


  2. esmi
    Forum Moderator
    Posted 5 years ago #

    WordPress doesn't add most of those classes. They're part of your theme and, without them, your pages may not look very good. The only one that looks like a core class addition is page_item page-item-2 but, if you don't use those CSS hooks, you can just ignore them. What's the point in removing them?

  3. pixelhub
    Posted 5 years ago #

    Thanks for the reply,

    class="entry" was a bad example, I was looking to reduce the amount of code that was generated. It not a problem I just don't like the fact that there is useless code filling out the pages.

Topic Closed

This topic has been closed to new replies.

About this Topic