parandroid
Forum Replies Created
-
Forum: Themes and Templates
In reply to: Custom post type tags/categories archive pagePut code below to your functions.php
add_filter('pre_get_posts', 'query_post_type'); function query_post_type($query) { if(is_category() || is_tag()) { $post_type = get_query_var('post_type'); if($post_type) $post_type = $post_type; else $post_type = array('post','cpt'); // replace cpt to your custom post type $query->set('post_type',$post_type); return $query; } }
Hope it will work for you.
This is not what I meant, but I had buttoned it, and still thank you for your reply.
Yes, You are clever and fast… Exactly what I needed, Thank you very much!
Forum: Plugins
In reply to: [Plugin: Query Multiple Taxonomies] CFT and QMT conflictIt’s done, version 1.5b2 is custom fileds taxonomies!
But I had another problem:
I register a new post type “music”:
register_post_type( ‘music’ , array(
‘label’ => __(‘Music’),
‘singular_label’ => __(‘Music’),
‘public’ => true,
‘show_ui’ => true,
‘publicly_queryable’ => true,
‘capability_type’ => ‘post’,
‘hierarchical’ => false,
‘rewrite’ => true,
‘query_var’ => true,
‘supports’ => array(‘title’, ‘author’, ‘editor’,’thumbnail’,’excerpts’,’trackbacks’,’custom-fields’,’comments’,’revisions’,’page-attributes’)
));When I active “Query Multiple Taxonomies”, a tag query like
“https://localhost/wordpress/?tag=test”
will show posts with “post” type and has tag “test”, not show posts with “music” type even has tag “test”.Forum: Plugins
In reply to: [Plugin: Query Multiple Taxonomies] CFT and QMT conflictOh, I downloaded, it’s 1.1.2a, and still can’t fix problem…
Forum: Plugins
In reply to: [Plugin: Query Multiple Taxonomies] CFT and QMT conflictThanks, scribu! And I’m sorry for wrong spelling your name:)