[matador_taxonomy] Shortcode

The [matador_taxonomy] shortcode, and its aliases [matador_categories], [matador_locations], and [matador_types] create lists or select/multiselect (drop-down) of Matador’s taxonomy terms.

Parameters

tax: Choose the taxonomy for which you want to show terms. The default Matador taxonomies are ‘category’, ‘type’, and ‘location’, with other options enabled by extensions. Defaults to ‘category’. Overridden by the alias shortcodes to the associated taxonomy.

as: How the shortcode will display the taxonomy terms. Choose from ‘list’ to display an unordered list of terms, ‘select’ or ‘dropdown’ to display a form select control, or ‘multiselect’ to display a select form control with multiple selections allowed. Default is ‘list’.

method: How the shortcode will configure the list. Choose ‘link’ to create links to taxonomy term pages, ‘filter’ to reload the current page with query variables that limit results to the taxonomy term value, and ‘value’ to do no action but pass the values in a form submission. Default is ‘filter’.

multi: Used instead of as ‘multiselect’ to allow multiple selections. Defaults to the appropriate value for the as parameter.

show_all_option: Choose from ‘after’, ‘after_if’, ‘before’, ‘before_if, ‘both, ‘both_if’, true, false. The default is false. This parameter is used to add a “Show All” item when the as parameter is ‘list’. You can place this “all” option before the list of terms, after it, or both before and after. When choosing one of the options with ‘if’ in the name, this will result in the “all” option not being shown when viewing jobs without any filtering on that taxonomy.

class: Add an extra CSS class to the wrapper.

Alias Shortcodes

You can omit the tax parameter when using any of the “alias” shortcodes:

[matador_categories], [matador_locations], [matador_types]. These shortcodes accept the same parameters as above, but override tax with category, location, or type.

Examples

[matador_taxonomy tax=type method=filter multi=true]

[matador_taxonomy tax=location as=select method=filter show_all_option=true]
 
[matador_taxonomy tax=location as=filter show_all_option=true]

[matador_taxonomy tax=location as=list method=filter show_all_option=both_if] 
Updated on September 24, 2023

Was this article helpful?

Related Articles

Need Support?
Can't find the answer you're looking for?
Contact Support