Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums Other Remove/Edit Img classes in WordPress

  • This topic is empty.
Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #39490
    chrisburton
    Participant

    So WordPress is outputting this

    Text

    However, I would like it to output this

    Text

    Removing the align class and removing the size- part.

    How can I go about this via a filter in the functions.php file?

    #108401
    betzster
    Participant

    I’d suggest just changing your CSS to use these classes as it’s going to be a lot easier.

    #108425
    chrisburton
    Participant

    However I’d rather not delete and edit those classes every time I insert an image.

    #108426
    TheDoc
    Member

    I think @betzster has a point here – any reason you can’t just use the classes that WP is outputting?

    #108429
    chrisburton
    Participant

    @TheDoc As you are aware, WordPress outputs a ridiculous amount of classes. I believe this is because for the majority of people it allows for more targeting. That doesn’t mean it’s necessary for everyone. Therefore, I have removed the output of the classes for the menu and now I am trying to rid it from images. I’m not saying I can’t use them, but I prefer to markup my site the best way that works for me.

Viewing 5 posts - 1 through 5 (of 5 total)
  • The forum ‘Other’ is closed to new topics and replies.