Sign up ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I need to insert into post a simple form handler, but WordPress' engine deleted my code after saving. how can I fix it?

share|improve this question

migrated from Jul 20 '12 at 12:18

This question came from our site for pro webmasters.

2 Answers 2

Posts cannot contain PHP code, they get cleaned when you submit form. This is an obvious security precaution.

There are plugins that will enable you to do this.

For example:

share|improve this answer

As an alternative to adding your PHP it may be easier to use a plugin like Contact Form 7 to create your form.

share|improve this answer

Your Answer


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