OK, discovered that there actually is a widget that can take care of this π
When trying the widget it turned out that it only works for taxonomies that are hanging under post-type ‘post’, but my taxonomies hang under post-type ‘page’ so I changed that accordingly in the plugin files:
query-multiple-taxonomies.php line 88
widget.php line 31
One last question is: How can I use this as a search outside of the widgets?
Thanks
What is the name of the widget you are using?
Plugin Author
scribu
(@scribu)
@timothyharter: Taxonomy Drilldown (it’s included in the plugin).
@senlin: instead of modifying the plugin, you can add this code to your theme’s functions.php file:
function my_qmt_post_type() {
return 'custom-post-type';
}
add_filter('qmt_post_type', 'my_qmt_post_type');
One last question is: How can I use this as a search outside of the widgets?
Not sure what you mean.
@scribu thx for the tip on adding the code to my functions.php instead of modifying the plugin!
re my last question: I would like to be able to use the plugin as a search function on my website and not necessarily in widget style. What code would I need to add to my template files to make this possible?
Thanks, the plugin does an excellent job!
Plugin Author
scribu
(@scribu)
I saw your example link and I see what you’re getting at now. Yes, it’s possible, but it requires quite a bit of code to achieve.
Hmmm, I have been thinking on how to do it too.
Ideally – and what I am aiming to achieve – there is a line of code that I can add to my template files. Lester Chan does that with most of his plugins, as you can see for example here: http://lesterchan.net/wordpress/readme/wp-postviews.html
Perhaps another way of accomplishing it is to add a horizontal widget to my template files?
hi again scribu,
something else I discovered with using your plugin that when clicking on the minus sign (-), you automatically return to the home page. Is it also possible to return to the main taxonomy instead of returning to the homepage?
thanks.
Plugin Author
scribu
(@scribu)
What do you mean by “the main taxonomy”? Could you give an example?
Perhaps another way of accomplishing it is to add a horizontal widget to my template files?
Yeah, you could add a sidebar that displays widgets horizontally, but you’d still have to write the widget.
explanation of returning to “the main taxonomy”:
Let’s say we are on the about page. in the sidebar we have your widget running with a bunch of different taxonomies:
product-type
– A
– B
– C
color
– red
– blue
– green
Now when I click on either one of the products and then either one of the colors, I will see the content that is applicable to those taxonomies.
However, when I click on the minus sign [-] behind a taxonomy to unselect it, I am directed to the homepage of the website. I would either like to return to the page where I came from when Istarted selecting the taxonomies OR go to the page that shows the first (hierarchical) taxonomy (Products A, B & C)
Do you understand what I mean now?
Plugin Author
scribu
(@scribu)
Yes, except WordPress doesn’t have a /product-type/ page, just like it doesn’t have a /category/ page. It only has /product-type/a/ etc.
I am not sure if I understand what you mean, I think it also largely depends on how people have the permalinks set up…
Would it be possible for you to point me in the direction so I could tweak the plugin to my own liking and let it go where I want it to go, instead of going back to the home page?
Plugin Author
scribu
(@scribu)
In the development version, you can use the ‘qmt_base_url’ filter:
function my_qmt_base_url( $url ) {
$query = QMT_Core::get_actual_query();
if ( empty( $query ) )
return $url;
return site_url('some-page');
}
add_filter('qmt_base_url', 'my_qmt_base_url');
To make the user go back to the page he started on, you will need to use a browser cookie.