wp_handle_upload error “Specified file failed upload test” but still creates attachment?
Try using media_handle_upload() instead, solved a similar problem for me.
Try using media_handle_upload() instead, solved a similar problem for me.
Managed to figure it out by adapting that code from the link i posted: function atom_search_where($where){ global $wpdb; if($_SESSION[‘js’] != ”) $where .= “OR (t.name LIKE ‘%”.trim($_SESSION[‘js’]).”%’ AND {$wpdb- >posts}.post_status=”publish”)”; $where .= “OR ($wpdb->postmeta.meta_key = ‘_job_ref’ AND $wpdb->postmeta.meta_value=””.$_SESSION[“js’].”‘)”; return $where; } function atom_search_join($join){ global $wpdb; if($_SESSION[‘js’] != ”) $join .= “LEFT JOIN {$wpdb->term_relationships} tr ON … Read more
Have you tried adding this hidden field to the search form? <input type=”hidden” name=”post_type” value=”news” /> For value=””, you should include the name of your custom post type, of course.
Have you tried this plugin: http://eskapism.se/code-playground/simple-fields/ It’s quite capable and should do what you want without getting your hands too dirty.
Have you considered using WP’s add_image_size function? Here’s the Codex entry. Basically you could add all the sizes you require throughout your theme via your functions.php and then call the appropriate size in your page/post template. Good luck!
I would write a converter and separate all of these data once. There is just no way to build a really fast query against serialized data.
I believe this was my solution to a previous question you had. I mentioned in that answer that the code didn’t deal with the eventuality of a key with multiple values and only some of which are empty. The reason why is how WordPress treats delete_post_meta… When using delete_post_meta, the first two arguments specify the … Read more
You might like to try Event Organiser (disclaimer: I’m the plug-in author). This plug-in handles event and venues management. Events are a custom post type, and venues are a custom taxonomy. All it would lack for your needs is the ‘artist’ – this could be handled by adding a metabox to an event which allows … Read more
meta_query & tax_query behavior When you’re defining a meta/tax_query and make use of the new array style argument list for multiple sets of term or custom field keys, then your query might look close to the following array( ‘tax_query’ => array( ‘relation’ => ‘OR’, array(‘taxonomy’ => ‘tax1’, ‘field’ => ‘slug’, ‘terms’ => ‘term1’), array(‘taxonomy’ => … Read more
Use http://codex.wordpress.org/AJAX_in_Plugins plus any of the metadata functions like http://codex.wordpress.org/Function_Reference/get_metadata.