WordPress Multiple Taxonomy Query

Perhaps you can add a hidden field to the HTML which will pass the ‘relation’ => ‘OR’. <input type=”hidden” name=”tax_query[relation]” value=”OR”> <select name=”tax_query[][country]” multiple> <option value=”united-kingdom”>United Kingdom</option> <option value=”ireland”>Ireland</option> </select> <select name=”tax_query[][type]” multiple> <option value=”director”>Director</option> <option value=”partner”>Partner</option> </select> Which translates to: tax_query[relation]=OR&tax_query[][country]=united-kingdom&tax_query[][type]=director Array ( [tax_query] => Array ( [relation] => OR [0] => Array ( … Read more

wp_remote_post and form post

wp_remote_get returns a json string. You have different function to work with this json response. wp_remote_head() wp_remote_retrieve_body(), wp_remote_retrieve_header(), wp_remote_retrieve_headers(), wp_remote_retrieve_response_code(), wp_remote_retrieve_response_message() The example from the codex: $response = wp_remote_get( ‘http://www.example.com/index.html’ ); if( is_array($response) ) { $header = $response[‘headers’]; // array of http header lines $body = $response[‘body’]; // use the content } Depending on the … Read more

Preventing form resubmission on contact form plugin

You can setup a wp_nonce_field to act as a single use token. You can then wp_verify_nonce to make sure the action requested matches the token. A more ideal way is to just use an AJAX solution and submit + respond using javascript. That will allow you to stay on the page and show/hide elements required … Read more

import excel form into wordpress

I honestly think you’d be better off just doing it manually. ~200 rows of items isn’t really that much, relatively. And even if you did find a way to import the excel file to make a form out of it, you’d still need to edit most of the data fields anyway. I highly doubt you’d … Read more

How to hide the form after successful php execution

If I understand the code correctly, you are wanting to make the result_display() function call conditional by moving the post check to inside the shortcode function. ie. function display_shortcode() { ob_start(); if (isset($_POST[‘submit’])) {result_display();} else {html_form_code();} return ob_get_clean(); }

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)