QMTS shortcode

This shortcode adds a form to the page where it is used. When a user submits that form it will take them to a list of content which match the selected taxonomies.


This Shortcode requires 2 plugins to be activated: Query Multiple Taxonomies 1.6.2, Query Multiple Taxonomies Shortcode 0.5


  • type - the type of content to be filters. ex. post, page, profile_cct. The default is "post".
  • taxonomies - a comma seperated list of the taxonomies that you want to appear on this form.
  • labels - a comma separated list of labels for each taxonomy. This list corresponds to the 'taxonomies' attribute. So the first taxonomy in that list will get the first label in this list, and so on. If no labels are provided the taxonomy's name will be used.
  • before_label - to be displayed before each label.
  • show_option_all - the text to display for the all/none option in the each dropdown. By default it will be blank.
  • submit - text to display on the submit button. The default is "Submit".
  • reset - text to display on the reset button. The default is "Reset".
  • reset_url - the url to redirect to when the user clicks the reset button. The default is the site's root url. You should set this to be the url that the shortcode is on.

Examples of QMTS Usage

[qmts reset_url="http://google.com" taxonomies="categories,post-tags" before_label="some text" labels="categories,tags" submit='Go' reset="reset and go to google"]

To use this shortcode with the Profile CCT Plugin, add a prefix to each taxonomy, like so; profile_cct_$value

[qmts reset_url="http://sites.olt.ubc.ca/faculty-page" taxonomies="profile_cct_division,profile_cct_position" 
before_label="some text" show_option_all="" labels="Division,Position" submit='Display Faculty' reset="reset the page"]

Submitting an Empty Form

If a user submits the form with all fields Empty or set to "All", then they will be redirected to an undefined page. It's recommended that you set up a redirect from that location to your "All results" page.

source: https://wiki.ubc.ca/Documentation:CLF_Advanced_WordPress_Theme/qmts

Leave a Reply

You must be logged in to post a comment.