Title: WP ignores class attribute in posts
Last modified: August 18, 2016

---

# WP ignores class attribute in posts

 *  [mipi](https://wordpress.org/support/users/mipi/)
 * (@mipi)
 * [19 years, 4 months ago](https://wordpress.org/support/topic/wp-ignores-class-attribute-in-posts/)
 * Hi everybody,
    my posts contain html code: <div class=”whatever”> … </div>. Unfortunately
   WP ignores the class attribute when displaying the post. When I look into the
   DB the post looks alright, but the html source only contains <div> … </div> (
   without the class attribute. What is the reason? Thanks and best regards, MiPi

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [DianeV](https://wordpress.org/support/users/dianev/)
 * (@dianev)
 * [19 years, 4 months ago](https://wordpress.org/support/topic/wp-ignores-class-attribute-in-posts/#post-504783)
 * Is it possible that you’ve stuck the **class=”whatever”** in the wrong area in
   the template, such that it gets stripped out by PHP?
 * That would be the first place I’d look.
 *  Thread Starter [mipi](https://wordpress.org/support/users/mipi/)
 * (@mipi)
 * [19 years, 4 months ago](https://wordpress.org/support/topic/wp-ignores-class-attribute-in-posts/#post-504785)
 * Problem is solved with upgrade to WP 2.07
    Thanks!

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘WP ignores class attribute in posts’ is closed to new replies.

## Tags

 * [html](https://wordpress.org/support/topic-tag/html/)

 * In: [Fixing WordPress](https://wordpress.org/support/forum/how-to-and-troubleshooting/)
 * 2 replies
 * 2 participants
 * Last reply from: [mipi](https://wordpress.org/support/users/mipi/)
 * Last activity: [19 years, 4 months ago](https://wordpress.org/support/topic/wp-ignores-class-attribute-in-posts/#post-504785)
 * Status: not resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
