Support » Plugin: Query Multiple Taxonomies » 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!

Viewing 2 replies - 1 through 2 (of 2 total)
  • I’m looking for the exact same thing, did you manage to solve it @stueynet?

    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.