Contact forms going into spam folder
You have to read about SPF, DKIM, DMARC, and make proper settings on your domain, from which emails are sent.
You have to read about SPF, DKIM, DMARC, and make proper settings on your domain, from which emails are sent.
Instead of looking for a plugin I found a piece of code that solves my problem, unfortunately because I am not using a plugin this post doesn’t relate to WordPress and is off-topic. For those of you who are curious the code I am using is at: http://charlie.griefer.com/blog/2009/09/17/jquery-dynamically-adding-form-elements/ <!DOCTYPE HTML PUBLIC “-//W3C//DTD HTML 4.01 Transitional//EN” … Read more
Here’s an example of how to unset the standard WordPress sizes or any size for that matter assuming you know the image size name and of course you can simply inpect the $sizes array to determine what to unset… function wpse219360_disable_intermediate_image_sizes($sizes) { if ( isset($_FILES[‘file_input_1’]) && $_FILES[‘file_input_1’][‘error’] != UPLOAD_ERR_NO_FILE ) { unset($sizes[‘thumbnail’]); unset($sizes[‘medium’]); unset($sizes[‘large’]); } … Read more
Specific to nonce there is nothing to worry about as there is a third private parameter which is kept in secret (one of the keys added in your wp_config.php file). In general, there is no such thing as “closed source”, and all code can be read and interpreted by anyone that is willing to dedicate … Read more
You need to validate the reCAPTCHA immediately once you POST the form. You’re just sending a POST to the same page, so it should be done before any other handling. If it does not validate, you need to show the form again, with an error message. function recaptcha_validated(){ if( empty( $_POST[‘g-recaptcha-response’] ) ) return FALSE; … Read more
You can send GET variables in the URL using wp_redirect. For example: wp_redirect( home_url() .’/form?result=error&reason=3′); As far as I know, yes, admin-post is the best-practices way to handle POST data in WordPress.
Trying to save and display a wp_editor()
The best way to process the custom form is the following. If you are using nonce then you don’t really have to check $_POST[‘checkbox’], the code below can be used simply to verify_nonce and then process the form. function process_my_form() { if ( wp_verify_nonce( $_POST[‘my_nonce_field’], ‘my_nonce’ ) ) { // process your form here // … Read more
Simply add the post_id parameter to the get_comments arguments array something like: global $current_user,$post; $args = array(‘user_id’ => $current_user->ID,’post_id’ => $post->ID); $usercomment = get_comments($args); if(count($usercomment) >= 1){ echo ‘disabled’; } else { comment_form(); }
Okay, so in case this is of use to anyone else. The original checkbox hack tut that I was following came from here. I’ve got around the issue that I was having in WordPress by wrapping my checkboxes in the labels like <label><input id=”fieldjtdktry-0″ name=”cm-fo-jtdktry” value=”4469820″ type=”checkbox” /><span></span>Learn</label> and then just tweaking the CSS selector … Read more