Query Multiple Taxonomies
[resolved] A nice addition (patch) for drilling in subpages (3 posts)

  1. konrad_ha
    Posted 3 years ago #

    Hi scribu,

    I'm about to start using your plugin for an interesting site, especially the checkbox functionality is great!

    During testing I realized that the plugin would always bump back to the blog's base URL.

    I applied this little patch to QMT_URL::get_base :

    public function get_base() {
    		static $base_url;
    		if ( empty( $base_url ) ) {
    			$protocol = ( strpos( strtolower($_SERVER['SERVER_PROTOCOL']),'https' ) === FALSE ) ? 'http' : 'https';
    			$base_url = apply_filters( 'qmt_base_url', $protocol . '://' .$_SERVER['HTTP_HOST'] .  parse_url($_SERVER['REQUEST_URI'],PHP_URL_PATH) );
    		return trailingslashit( $base_url );

    What this does is using the current permalink instead of the blog's base URL. Right now everything seems to work just as expected, meaning I can use the checkbox drilling in categories.

    I wonder if I have overlooked something, but this really makes the plugin much more useful to me.

    Feel free to consider adding this to a future release. Right now I am using a fork of your plugin, but I'd love to revert back to the "official" version with all the updates and whatnot.


  2. scribu
    Plugin Author

    Posted 3 years ago #

    Hi Konrad,

    See that apply_filters( 'qmt_base_url', ... ) call?

    You can use that to overwrite the URL that QMT generates, without forking the plugin:


  3. konrad_ha
    Posted 3 years ago #

    I knew I had forgotten something! Thanks and keep up the good work, this is a very well written Plugin.

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Query Multiple Taxonomies
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic


No tags yet.