Support » Plugin: Query Multiple Taxonomies » [Plugin: Taxonomy Drill-Down] Making the reset link user-defined

  • Resolved Travis Northcutt


    Just an idea for an enhancement to this plugin – an option to change the “Reset” link (defined in the get_base function on line 87 of core.php), perhaps on a per-widget basis. If I knew how to add this functionality I’d supply a patch, but I don’t.

    My use-case that prompted this thought: using this plugin’s widget to allow a user to filter items on an inventory page, and only displaying the widget on pages containing inventory (i.e. not on the home page). Without changing the reset link, the user would be directed back to the home page, which would be confusing. I was able to simply change line 93 to return $base_url . '/inventory';, but obviously that’s hacky and not an ideal solution.

    Allowing the user to set the reset link on a per-widget basis would also allow for using multiple instances of the widget on different pages/kinds of pages. Perhaps just a field in the widget (where taxonomies are selected) allowing the user to append something to the URL would suffice?

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author scribu


    You can change the reset link via a filter:

    There’s no per-widget setting, but you could use qmt_get_query() to check which taxonomies are currently queried.

    Ahh, that’s perfect. Didn’t realize there was more documentation available somewhere. That’ll do nicely, thanks! (I do still think there could be a use for what I was talking about, for non-developers who don’t want to add code, but that depends on how much you want to add extra code to the plugin, etc. This is great for me.)

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘[Plugin: Taxonomy Drill-Down] Making the reset link user-defined’ is closed to new replies.