Hi Scribu – I really hope I’m posting in the right place this time.
I’m not sure if you recall, but, I was using the earlier dev version of QMT and had some specific functionality that I needed.
You helped me to get that all sorted with some filters, but, now I am trying to go ahead and use the newer version, which does things a little differently, and maintain the same functionality.
Problem is, like the person above, I need to use the post type in order to customize the reset.
Here is what I have been using for the QMT version I am on:
//I realize with the new version I don’t need this first function, as I can call it with the widget now——————-//
function my_qmt_post_type() {
global $wp;
global $wp_query;
if ( get_query_var('post_type') === 'lesson' ) {
return 'lesson';
}
if ( get_query_var('post_type') === 'workshop' ) {
return 'workshop';
}
if ( get_query_var('post_type') === 'howto' ) {
return 'howto';
}
}
add_filter('qmt_post_type', 'my_qmt_post_type');
function my_qmt_base_url($base) {
$ptype = get_post_type_object(QMT_Core::get_post_type());
$plural = sanitize_title_with_dashes($ptype->label);
return get_bloginfo('url') . '/' . $plural;
}
add_filter('qmt_base_url', 'my_qmt_base_url');
What I have are 3 custom made archives of 3 different custom post types using template_redirect and new rewrite rules.
The sidebar of each of these custom archives is where the taxonomy drilldown widgets live.
When drilldown add/remove is clicked it goes to multitax template, where it currently only shows post types from the custom post_type archive page which sent it there. It then resets back to that custom post_type archive.
Multitax is using get_query_var to know what header to show and what sidebar QMT widget to bring in ( also according to post_type )
All three of my custom post types ( lessons, howtos, workshops ) share the same subsets of taxonomies … art subject, academic subject etc.
When filtering lessons, I need to be able to stay within the lesson post type and filter by multiple taxonomies.
I can do that now, but, would like to take advantage of the newer code to regain my category functionality etc.
Is there any way to do this reset now?