What you’re looking at in the screenshot is the value of the post_content
field from the database. There’s HTML and CSS (in the screenshot) because there is HTML and CSS in the post’s post_content
field in the DB.
If you want to get rid of this, you have a few approaches. One would be to store the pure content in a meta field (this would be a bit tedious – you would need your content in two separate places and that’s never a good idea). Another approach could be to strip the tags using functions like wp_kses()
and preg_replace()
. There are a lot of resources online (especially regular expressions) showing how to strip tags while preserving content.
Cheers,
Kevin.