Contact Form 7 WordPress, checking a few fields, if empty then invalid

I solved my problem add_filter(‘wpcf7_validate_text’, ‘or_input_validation_filter’, 20, 2); function or_input_validation_filter($result, $tag) { if (‘your-link’ == $tag->name) { $your_link = isset($_POST[‘your-link’]) ? trim($_POST[‘your-link’]) : ”; $your_file = (!empty($_FILES[“file-image”][“name”])) ? trim($_FILES[‘file-image’][‘name’]) : ”; if($your_link == ” && $your_file == ”) { $result->invalidate($tag, “One of the fields has not been completed?”); } } return $result; }

Blog keeps redirecting to the contact page

After looking for the problem for a while, I decided to search in the MySQL database for the word “contact”, and I noticed that a table called wp_redirection_items indeed contained an entry which redirected from /blog/ to /blog/contact. A quick Google search has led me to this page, explaining the problem – it’s caused by … Read more