[Plugin: Query Multiple Taxonomies] Custom reset
-
Hi Scribu
Sorry about this but I seem to be having problems with the custom reset (again)
I had it sorted after your help in this thread:
I have two custom post types – ‘snapshots’ and ‘resources’ each displayed on separate pages and each requiring their own custom reset to return the user to the page in question. This worked perfectly a few weeks back but I’ve been working on a seperate part of the site (actually a joomla installation so I haven’t really touched much of the wordpress installation since I got it sorted).
Now, when I try to use the widget, the searching all works just fine, but for some reason the reset takes the user to a 404 page. The weird thing is that when I hover over the reset button it displays a link to https://www.mysiteurl.com/post1 where post1 is the last post in the list that the plugin generates.
Can you think of any reason why this should be? I’ve wracked my brains and reversed just about every change I’ve made to the site that I can think of. I’ve set up a redirect to a subdomain using htaccess (excepting my IP of course) during development which I thought might be the problem but I disabled this and the problem remains.
I’ve reinstalled the plugin a couple of times (v.1.3.1-alpha3) deleted and reinstated the widget and I’m using this code in my functions file to set up the custom reset:
<?php function my_qmt_base_url( $url ) { // Get the list of queried taxonomies $tax_names = array_keys( qmt_get_query() ); // Choose page ID if ( in_array( 'job_types', $tax_names ) || in_array( 'location', $tax_names ) || in_array( 'expertise', $tax_names ) ) $page_id = 5; elseif ( in_array( 'resource_subjects', $tax_names ) || in_array( 'resource_types', $tax_names ) ) $page_id = 86; // etc. return get_page_link( $page_id ); } add_filter( 'qmt_reset_url', 'my_qmt_base_url' ); ?>
Any help most appreciated! Going to try nuking everything to do with htaccess redirects, QMT and anything else I can think of that might be screwing with it but wanted to see if you had any ideas first.
- The topic ‘[Plugin: Query Multiple Taxonomies] Custom reset’ is closed to new replies.