You could take the query var and programatically expand the numbers between your minimum value and maximum value.
Assuming http://tax.jenswedin.com/age/10,20/ is rewritten to http://tax.jenswedin.com/?age=10,20, then (pseudo code)
$parts = explode(get_query_var('age'), ',');
$min_val = $parts[0]; // Should be 10 in this example
$max_val = $parts[1]; // Should be 20 in this example
$range = range($min_val, $max_val); // http://php.net/manual/en/function.range.php
/* Blah blah blah lets jump to where you need to query the terms */
$args = array(
'tax_query' => array(
array(
'taxonomy' => 'age',
'field' => 'slug',
'terms' => $range
)
)
);
$query = new WP_Query( $args );
This works well for things like numbers. But you could do a foreach
loop over the $range array and make the values whatever you need them be.
Related Posts:
- Show list of custom taxonomies when another taxonomy is selected
- List posts in a category grouped by other categories?
- Exclude taxonomy term from list of current taxonomy terms
- Attaching taxonomy data to post with wp_insert_post
- How to get taxonomy term of the current page and populate queries in the template
- Custom taxonomy list page?
- tax_query in get_posts() not working?
- What is wp_insert_term “alias_of” arg for?
- wp_set_object_terms() — prevent overwrite?
- List Hierarchical Term List with Count with Related Term
- Is there a way to set singular/plural labels for taxonomy term names?
- List taxonomy terms as links
- Get_term_by only returns one item from array
- Can we have same term slug in different taxonomies?
- How to have “the most used tags” taxonomy always expanded?
- Get parent and first child taxonomy terms?
- Display the number of published posts for each custom taxonomy term?
- Get wordpress taxonomy archive and sort by year
- Search for tags
- Combine multiple custom user taxonomy in single url
- Missing term_id and term_taxonomy_id when adding a term using wp_insert_term() function
- What hooks/filters are there to alter selected terms on post save?
- Filter blog archive by category in URL
- tax_query: What to pass when I want to have all terms?
- Custom Roll/Custom Post Type – Can’t Select Categories
- Trying to list terms of a custom taxonomy using get_categories
- Add a term to an attachment submitted from front end
- Get and loop posts with all taxonomy terms
- Unable to delete a Category and Tag that share same slug
- what tables uses wp_get_post_terms
- WordPress as thesaurus/dictionnary: what approach?
- Custom taxonomy is crashing Gutenberg
- How to show the category filter that’s shown on the ‘All post’ pages on a custom post type page in the admin area?
- Custom Field as Custom Taxonomy?
- Custom WP Query: force entry for some taxonomy and have others optional
- Using get_posts() with tax_query parameter set isn’t working with attachments
- How to get the top level parent term Advanced Custom Field values in the child terms
- Modify the query method when adding category filtering function to the custom post list
- Allow a Taxonomy Term to be Used Only Once Across All Posts
- Individual post. Meta_key, taxonomy or post status for separation?
- Count Published & Draft Posts Associated With Each Term
- get_the_term_list – Return links to edit.php instead of link to taxonomy archive template
- How to sync to custom taxonomies (tag structure)
- How to save a multiple checkbox array into a non-hierarchical taxonomy
- `get_terms()` with `child_of` and `childless` combined
- is_taxonomy() is not working
- Add text to the end of each list item in wp_list_categories
- Sorting tags by name
- get_term_by seems to be failing
- How to return newly added terms when using wp_set_object_terms
- How to update a taxonomy term for a custom post type with auto incrementing number
- Filtering elements by taxonomy slug
- Echo taxonomy name – second level
- Group Custom post type in a taxonomy page by its child taxomony
- In two-category searches, where does WordPress save the title of the 2nd category?
- Custom Post Type + Custom Taxonomy = Archive Listing Page Problems
- Taxonomy term archive default loop returns 1 record instead of 8
- Get terms in hierarchical taxonomy
- Taxonomy Checkbox Admin Panel
- Related terms – Terms that feature in post of current term
- Replacing a placeholder term with a session variable value in taxonomy filter
- Loop problem – Taxonomy
- How to relate to 2 taxonomy with category
- WP Search using taxonomy terms
- How to get post count of specific taxonomy that have store name & category
- How To Query For An Empty Taxonomy Field
- Is possible hide hierarchical select dropdown created by jetsmartfilters? (only visual issue)
- How do I converge taxonomy category permalinks into one?
- Taxonomy terms are not checked when edit custom post
- Url leading to archive page, no matter what
- Checking if a product ID has taxonomy term attached not working with has_term
- Can I create a tax query to return posts that match two slugs from same taxonomy
- Taxonomy.php inheriting first post
- How to limit number of category term display in home page grids?
- Display related terms from a taxonomy in an entry
- I want to get term by term_name without taxonomy
- Add specific content to a taxonomy results page
- Set the limit of taxonomy per page
- What is this Query? and why its taking too much time? Any way to optimize it?
- taxonomy terms, inverted
- Same page for startpage and archive?
- How to share terms between two taxonomies?
- Taxonomy Rewrite Problem
- Taxonomy terms can’t find posts from archive.php or taxonomy.php
- Custom taxonomy and query multi conditions
- how to print post tags [duplicate]
- Filtering posts by taxonomy and meta_value
- How to get a query odered by N of matching taxonomies?
- GET Taxonomy ID
- Hiding an Advanced Custom Field based on Taxonomy Field selection
- Non-Recursive get_term_children()
- How do I add tags/taxonomy to images + a query field on page to query ‘albums’ (images with same tag/taxonomy)
- Delete Term via edit-tags.php
- Child Terms not Displaying on the Taxonomy Term Admin Screen
- multiple taxonomies in wp_list_categories’ $args
- Description of a sub-taxonomy
- Order taxonomy terms by the frequency of use in the last 30 days
- I need to add new menu item inside the custom post admin menu
- Custom Titles for Multiple Tag Taxonomy Page
- Add new taxonomy in WP without generate any url