Viewing 8 replies - 1 through 8 (of 8 total)
  • Thread Starter korymath

    (@korymath)

    It is almost as if the Submit button jumps right to archive.php ignoring possible alternatives like taxonomy-member.php or even just taxonomy.php.

    Any one able to provide some advice?

    Kory

    I see, you found the answer. Can you share it with us? I have the same problem; want to show all of the products when no dropdown is marked and the searchbutton is hit.

    I’d love to know this as well.

    Thread Starter korymath

    (@korymath)

    This was done with just submitting an empty query, and ensuring that my archive for custom post type member was built out. It will jump to a default archive for a custom post type if no special template is defined.

    Thanks for the reply… I think you may have had a different problem than the one I’m trying to solve. I’ve already built a CPT archive specific to each of my post types, but submitting an empty query seems to just take me to a page built from index.php. I guess my problem is that I’m struggling to find a way to include my CPT in the query string automatically.

    Basically, I’ve got a few custom taxonomies (resource_type, topics, timeline) which I want to query within a CPT called ‘resource’.

    I can access the cpt archive by going to http://site.com/?post_type=resource

    But when I make my query I lose this parameter… I get a query string that looks like, for example, “http://site.com/?resource_type=magazine-article&topics=&timeline=”

    What I want is to have the resource archive automatically add “?post_type=resource” to query strings, resulting in query strings like this: “http://site.com/?post_type=resource&resource_type=magazine-article&topics=&timeline=”

    One way to solve this would be to add a dropdown for post types, but for some reason I can’t seem to get this to appear.

    Sorry if this is the wrong place for all this… I think I may have to start my own support thread.

    Thread Starter korymath

    (@korymath)

    Probably best to start your own thread, are you using http://wordpress.org/extend/plugins/query-multiple-taxonomies/

    What are the multiple types that you want to query, this is probably because query strings are specific to the type.

    Yeah, I’m using version 1.62 of QMT.

    I want to query ‘resource’, ‘people’, ‘animation’, ‘studios’ and ‘wiki’, depending on if I’m in the resource, people, animation, studios, or wiki archives, respectively.

    Following this (http://wordpress.org/support/topic/plugin-query-multiple-taxonomies-base-url-problem?replies=6#post-3452905) I’ve come up with the following code… though it doesn’t seem to actually affect my queries.

    if ( is_post_type_archive() ) {
    
        $CPTquery = get_post_type( $post->name );
    }
    
    function my_qmt_base_url() {
    	return '../?post_type=' . $CPTquery;
    }
    add_filter( 'qmt_base_url', 'my_qmt_base_url' );

    Still struggling but after a few hours I think that the code looks closer to what it should:

    function my_qmt_base_url() {
    	if (is_post_type_archive()) {
    		$CPTquery = get_post_type( $post->name );
    }
        return add_query_arg( 'post_type', $CPTquery );
    }
    add_filter( 'qmt_base_url', 'my_qmt_base_url' );

    I’ve started a new thread so not to monopolize this one: http://wordpress.org/support/topic/make-empty-queries-filter-automatically-by-custom-post-type-of-archive?replies=1#post-3453695

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘[Plugin: Query Multiple Taxonomies] Show all custom type if no filters selected’ is closed to new replies.