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
- How do I modify taxonomy term slugs dynamically?
- How to have this permalink structure: post_type/postname/custom_inner_page
- woocommerce custom product category template
- Permalink help with default Posts and custom Taxonomy
- 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?
- Add Taxonomy Subcategory To Permalink
- Replace taxonomy permalinks
- Custom Taxonomy and Rewrite URL
- CPT’s with landing page instead of archive – Url Rewrite?
- Base permalink for custom taxonomy
- Permalink structure with custom taxonomies and custom post type like /parent-tax/child-tax/custom-post-type-name (with no base name)
- 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
- How to rename custom taxonomy URL with extra words
- Custom URLs in Custom Search Results
- Set tax_query conditionally with new WP_Query
- querying posts by custom taxonomy terms right from a querystring based URL
- Best way to specify “article type” in URL
- Custom Taxonomy specific to a Custom Post type – rewrite URL
- How to customize custom taxonomy url?
- When filtering query on custom taxonomy; main menu dissapears
- Exclude taxonomy term from all loops, but having it on widget
- Why can’t I use an array of term slugs in WP_Query?
- wp_query not resetting, last post hanging
- Using WP_Query and Query_post for the loop?
- Problem with wordpress pagination
- How to do a particular wp_query taxonomy search
- Permalink Problems
- Custom Post Type Advanced Slug
- Duplicate slug/permalink issue
- Clean Custom URL for Serach + Custom Taxonomy
- WordPress custom permalink and archive link for custom post type
- Custom rewrite permalink doesn’t work
- WordPress modify Settings > Permalinks (options-permalink.php) Add CPT Permalink Options
- forward/redirect taxonomy archive of term to a page with same name
- URL rewriting taxonomy term
- Custom Taxonomy Breaks Pages
- How can I add a custom permalink to a term?
- Wp_query…a type of term a different div
- check if a taxnomy queried in $wp_query?
- Taxonomy.php how to show post only in current taxonomy with wp_query?
- How can i fix a 404 error when targeting custom taxonomy slug ?
- Permalinks with custom taxonomies and regular categories
- WP_Query tax_query – Show results if child has parent X
- Query custom taxonomy for category including children
- Permalink issues with custom taxonomies
- Proper way to create taxonomy queries
- 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
- Need equivalent of single_term_slug
- 404 Error on Custom Post Type / Custom Taxonomy
- How to define %category% for custom taxonomies?
- Custom Permalink Structure for terms/taxonomies of custom post type
- How Can I Remove Child Slug From Grandchild Slug When Using Duplicate Grandchild Slugs?
- 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
- Prioritise Pages over Taxonomy Term Root Archive, but not Taxonomy Term Child Archives
- Taxonomy URL rewrite whilst keeping filtered posts?
- Rewrite Search URL Permalink For CPT Custom Taxonomies
- How to set the same base url for two different taxonomies?
- How to change Custom Permalink for Taxonomy? (remove the slashes from term-slug)
- Remove custom taxonomy slug from URL
- How to replace custom post type with custom taxonmy in permalinks
- How to structure all custom-taxonomy with three verbs(a,b,c) and route them accordingly?
- Get taxonomy link with post type slug prefix
- Rewriting url for multiple Taxonomies and Custom Post Type
- How To Create Dynamic Permalink To Custom Taxonomy List of Current Posts?
- Permalinks: custom post type -> custom taxonomy -> custom sub taxonomy -> post
- Pretty Permalinks with CTP and Taxonomies / Hierarchical
- Customise Permalink Structure For Custom Post Types
- Custom rewrite url structure for several custom taxonomy (NOT pos_type)
- Restructuring permalink with more than one taxonomies
- Remove taxonomy name and add .html extension in the custom taxonomy term URL
- How to paginate with an query var appended to permalink?
- Hierarchical taxonomies in permalink cause 404 for sub term archive