WordPress 3.5 Media Uploader – Only allow 1 upload and certain file types

The file types that you have specified ‘application/msword’, ‘application/vnd.ms-excel’, ‘application/pdf’ are already supported by media uploader. To see the default supported mime file types, call wp_get_mime_types() function. Use upload_mimes filter as shown in following code to make media uploader to accept files types other than the default. Add following code in your themes functions.php file … Read more

Custom Post Type Taxonomy Filters

I would take a look at this page on the Codex: http://codex.wordpress.org/Class_Reference/WP_Query I think you need to override your query_posts() for your landing page, and controlling different queries with if() statements, depending on what areas of a form (guessing you’re using a form?) has filled in. For example: // Carry pagination through $args = array( … Read more

Get term name and term parent into custom post type permalink

I solved this issue by the following codes where you need to define “rewrite” argument as follows register_taxonomy( ‘map_categories’, ‘map’, array( ‘hierarchical’ => true, ‘label’ => ‘Catégories’, ‘query_var’ => true, ‘rewrite’ => array(‘slug’=>’commerce/artisans’,’with_front’=>false, ‘hierarchical’ => true) ) ); You need to understand that ‘hierarchical’ in rewrite actually solve your purpose. After the update in codes … Read more