How to delete file uploaded by Plupload

To delete a file from the file system, you can use something like this attached to an AJAX hook that is called by jQuery: function ajax_remove_image() { check_ajax_referer( ‘image_removal’, ‘image_removal_nonce’ ); if ( ! $_POST[ ‘confirm’ ] ) exit( ‘false’ ); $uploads = wp_upload_dir(); $upload_dir = $uploads[ ‘path’ ]; $file = strpos( $_POST[ ‘file’ ], … Read more

Filter by Custom Taxonomy AND Custom Field

Ok I found a solution for my scenario. I combined those two plugins to filter by custom taxonomy and custom field: Query Multiple Taxnomies http://wordpress.org/extend/plugins/query-multiple-taxonomies/ Custom Query Fields http://wordpress.org/extend/plugins/custom-query-fields/ I changed the QMT Plugin template by adding the possibility to choose several custom fields and do a combined query. The URL now looks as follows: … Read more

Making a form for user to add new custom post with custom taxonomies and custom fields

To list the options for a custom taxonomy you need to query the taxonomy terms. To do that you use get_terms() http://codex.wordpress.org/Function_Reference/get_terms // We are assuming color is the name of the taxonomy $colors = get_terms( ‘color’, array( ‘orderby’ => ‘name’, ‘hide_empty’ => 0 )); // Now loop through the colors and spit out the … Read more