Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I use wp_insert_post to import external data in WP3.8. Part of the post_content field is a small form, see below.

$content.="<td><form action=\"http://www.mydomain.nl/solliciteren.html\" method=\"get\"><input type=\"hidden\" name=\"ref\" value=\"$reference\" /><input class=\"button\" type=\"submit\" value=\"Solliciteer naar deze functie\" /></form></td>";

When I echo this it looks fine, but after using wp_insert_post to import it I get the following result:

<form action='http://www.mydomain.nl/solliciteren.html' method='get'></form>

My question is: does anyony has a clue where my hidden field and button have gone? I think it has something to do with filtering, but (if that's the case) how can I prevent that in a save way?

share|improve this question

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.