Title: Forcing a post type
Last modified: August 21, 2016

---

# Forcing a post type

 *  [stueynet](https://wordpress.org/support/users/stueynet/)
 * (@stueynet)
 * [12 years, 8 months ago](https://wordpress.org/support/topic/forcing-a-post-type/)
 * I have seen some similar questions but most of them have really specific implementations
   and no answer yet. I am trying to do something a little more simple.
 * My site has 3 different post types. I would like to simply force a post type 
   that QMT retains in all of its queries.
 * Based on the page / template on the site, I invoke a different version of the
   widget. I would simply like to be able to pass a post type to the Widget so that
   I can use the drill down for different post types, or multiple ones.
 * I have checked the query_vars and even when the post type is in there, QMT doesn’t
   see it. Looking at the code for QMT I don’t see post type referenced anywhere.
 * Thanks in advance for any guidance!
 * [http://wordpress.org/plugins/query-multiple-taxonomies/](http://wordpress.org/plugins/query-multiple-taxonomies/)

Viewing 2 replies - 1 through 2 (of 2 total)

 *  [jpisanu](https://wordpress.org/support/users/jpisanu/)
 * (@jpisanu)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/forcing-a-post-type/#post-4173539)
 * I’m looking for the exact same thing, did you manage to solve it [@stueynet](https://wordpress.org/support/users/stueynet/)?
 *  Thread Starter [stueynet](https://wordpress.org/support/users/stueynet/)
 * (@stueynet)
 * [12 years, 4 months ago](https://wordpress.org/support/topic/forcing-a-post-type/#post-4173540)
 * Hi jpisanu. You can set the QM base URL as follows. Other than that you need 
   to achieve your goal in a variety of ways depending on your particular requirements.
   Unfortunately QMT is no longer being actively developed or supported so its tough
   to get help for it.
 *     ```
       add_filter( 'qmt_base_url', 'dl_qmt_base_url' );
   
       function dl_qmt_base_url( $base ) {
   
       	global $wp_query;
       	$the_post_type = $wp_query->query['post_type'];
   
       	if( $the_post_type == ''){
       	    return get_bloginfo('url');
       	} else {
       	    return get_bloginfo('url').'/'.$the_post_type.'/';
       	}
   
       }
       ```
   

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Forcing a post type’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/query-multiple-taxonomies.svg)
 * [Query Multiple Taxonomies](https://wordpress.org/plugins/query-multiple-taxonomies/)
 * [Support Threads](https://wordpress.org/support/plugin/query-multiple-taxonomies/)
 * [Active Topics](https://wordpress.org/support/plugin/query-multiple-taxonomies/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/query-multiple-taxonomies/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/query-multiple-taxonomies/reviews/)

## Tags

 * [drill-down](https://wordpress.org/support/topic-tag/drill-down/)
 * [Post Types](https://wordpress.org/support/topic-tag/post-types/)

 * 2 replies
 * 2 participants
 * Last reply from: [stueynet](https://wordpress.org/support/users/stueynet/)
 * Last activity: [12 years, 4 months ago](https://wordpress.org/support/topic/forcing-a-post-type/#post-4173540)
 * Status: not resolved