This is not supported by default, but you can convert the numeric terms back to slugs with the pre_get_posts
hook. I tested this with WP 3.0.1, but in 3.1 the taxonomy query handling changed, so I don’t know whether this will work by default or if there is a better way to do it.
add_action( 'pre_get_posts', 'wpse6066_pre_get_posts' );
function wpse6066_pre_get_posts( &$wp_query )
{
if ( $wp_query->is_tax ) {
if ( is_numeric( $wp_query->get( 'term' ) ) ) {
// Convert numberic terms to term slugs
$term = get_term_by( 'term_id', $wp_query->get( 'term' ), $wp_query->get( 'taxonomy' ) );
if ( $term ) {
$wp_query->set( 'term', $term->slug );
}
}
}
}
Bizarre that you prefer the numeric version, many would choose the term slug for SEO reasons.
Related Posts:
- Removing taxonomy base using WP rewrite
- Custom taxonomy on permalink
- Nice URLs for a Custom Post Type List with a Shared Custom Taxonomy?
- Pros and cons of using [taxonomy name] in place of [category name]?
- Permalinks for quote authors
- Add parent/child taxonomy to custom post type url
- Keep taxonomy base name in post permalinks
- Permalinks for custom taxonomy stopped to work
- Custom permalinks with hierarchical taxonomy – getting PHP warning
- how to change permalinks format for pagination?
- How do I create a permalink structure with 2 taxonomies
- Rewrite Rules returning wrong data
- How to change url for taxonomy pages?
- How to add hierarchical taxonomy with parent child relation to URL?
- How can I rewrite the URL of my custom taxonomy to include the year?
- How do I get the correct URL?
- Permalinks incorrectly inserting multiple categories
- Need help understanding a rewrite with multi-level taxonomy
- Taxonomy to WordPress Permalinks of custom post type
- Mixing custom post type and taxonomy rewrite structures?
- How do I exclude a custom taxonomy from the post loop
- Passing and retrieving query vars in wordpress
- custom taxonomy and pages rewrite slug conflict gives 404
- Remove taxonomy base or term from url
- Custom taxonomy listing page when no term set (all terms)
- How to enable hierarchical permalinks for hierarchical taxonomies
- URL rewrite rules for multiple taxonomies query
- Rewrite rule for custom taxonomy
- How do I rewrite a url to use %taxonomy% instead of %category% when multiple taxonomies are present?
- wp_query orderby title and meta key value (WP3.1)
- custom taxonomies on permalink
- Including two taxonomies in a permalink structure
- WP Rewrite Rules – Custom post type & taxonomy
- Page queried instead of a custom taxonomy
- Remove base slug in CPT & CT, use CT in permalink
- Permalink Structure problem with cpt and custom taxonomy
- WP redirects pretty permalink to query string
- Custom WP_Query breaks default behaviour of viewing right post associated with tax-term!
- Custom Taxonomy List links being re-written
- Excluding a custom taxonomy term breaks wp_get_post_terms
- custom taxonomy archive permalink shows 404 error
- Custom taxonomy term in WooCommerce product permalink
- Sorting Posts Via Custom Taxonomy Values Using Checkboxes?
- Improving WP_Query performance for multiple taxonomies
- Change URL structure of subcategory archive pages
- Custom Permalink Tag breaks Pagination
- Custom Permalink for Taxonimie and Custom Post Type
- how to search in custom fields & custom taxonomy for custom search
- Custom Post Type and Custom Taxonomy Permalinks
- WP_Query on custom taxonomy works fine but fails if run through wp_ajax_
- Permalink Structure CPT With Custom Taxonomy Fails
- Advanced Query Logic With Multiple Taxonomies
- Change Permalink Structure for Tag.php template
- 404 error- issues with pages after adding custom rules for posts
- How to overwrite registered taxonomy url from vendor plugin in child theme
- Rewrite URL for taxonomy listing
- Change the permalink URL to include a taxonomy term
- How to create custom url structure based on custom post type rewrite slug, taxonomy and category slug?
- Customize Custom Post Type URL
- Taxonomy Pagination Rewrite
- Custom Permalinks with CPT and Hierarchical Taxonomies
- How do I modify taxonomy term slugs dynamically?
- How to have this permalink structure: post_type/postname/custom_inner_page
- Custom Permalink Structure for Custom Post Type, Custom Taxonomy, Under a page
- Custom taxonomy returns 404
- How to display an other custom post type in a different custom post type’s archive?
- Hiding taxonomies with no children WP_Query & tax_query
- Can I use OR relation for one item when calling tax_query from WP_Query and use AND for the rest?
- Plugin generated taxonomies’ permalinks with custom placeholders
- Custom permalink with child taxonomy terms
- Pagination on Custom Tax Pages Removes Spaces from Query Vars
- querying posts by custom taxonomy terms right from a querystring based URL
- When filtering query on custom taxonomy; main menu dissapears
- Using WP_Query and Query_post for the loop?
- How to do a particular wp_query taxonomy search
- Permalink Problems
- Custom Post Type Advanced Slug
- WordPress custom permalink and archive link for custom post type
- Custom rewrite permalink doesn’t work
- forward/redirect taxonomy archive of term to a page with same name
- check if a taxnomy queried in $wp_query?
- Taxonomy.php how to show post only in current taxonomy with wp_query?
- Permalink issues with custom taxonomies
- how to use tax_query to apply both terms or one if one is empty
- Get current page term title to use in WP_Query
- passing moree than one value of slugs in taxonomy using variable
- Change the full permalink (URL) of a single post by connecting it to a specific page
- Custom Permalink For Custom Post Type – Working Fine But Broken For Pagination
- Rewrite Search URL Permalink For CPT Custom Taxonomies
- How to change Custom Permalink for Taxonomy? (remove the slashes from term-slug)
- Remove custom taxonomy slug from URL
- Hierarchical taxonomies in permalink cause 404 for sub term archive
- Permalink structure not working with Custom Taxonomy (URL like ./taxonomy/category/postname)
- Permalink Rewrite to include Custom Taxonomy Term
- Multiple taxonomies, what should the permalink look like?
- How do you move custom fields to custom taxonomies using WP Queries
- WordPress hiding posts without content on custom taxonomy query. How to solve?
- Order posts with custom taxonomy array
- Multiple Taxonomy in URL/Query – No Custom Post Type
- Creating a page for custom taxonomy archive