I am building a wordpress plugin, that acts when the admin saves a new post.
I need to get the content of that post and i am retrieving $_POST['content']
and $_POST['post_content']
.
The problem here is that i only get the text inside that content, i need the html.
This way, if i was expecting something like <p>Lorem</p><p>ipsum</p><p>dolor</p>
, I get Lorem ipsum dolor
.
Can someone help me please?
Thanks
Well, as @ChrisCarson points out, WordPress doesn’t store paragraph tags in the database by default.
So, what I need to do, is parse the paragraphs myself using:
thanks anyway
WordPress doesn’t store paragraph tags in the database by default. Try this…
From the codex: http://codex.wordpress.org/Template_Tags/the_content#Alternative_Usage