All WP functions UNDEFINED when creating PHP contact form
-
I’m creating a simple PHP/AJAX contact form in my WordPress theme. The ACTION is “/php/mailer.php
The problem is, when I submit the form, I get an UNDEFINED error for all WP functions in the mailer.php file (e.g. wp_mail, get_site_url, etc).
These functions work fine anywhere else. The wp_mail function, for example, will send email if I put it in a template file like “Contact Us”, but when it’s placed in mailer.php and retrieved by a form, I get the undefined error.
What’s going on here???
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘All WP functions UNDEFINED when creating PHP contact form’ is closed to new replies.