I think this should work if library functions are used everywhere.
function custom_term_archive_link($url, $term, $taxonomy) {
if($taxonomy != 'product_cat') { return $url;}
if( $term->name == 'my_term' ) {
$url="my_term_static_url";
}
return $url;
}
add_filter('term_link', 'custom_term_archive_link', 99, 3);
Related Posts:
- Taxonomy rewrite question
- Permalink Rewrite for Custom Taxonomy
- URL Rewrite with Custom Variables
- WordPress how to prevent URL encoding in URL of taxonomy terms
- Custom taxonomy named ‘tag’ return 404 page
- taxonomy term in URL slug won’t forward to the correct term for custom post like it does for default categories/normal posts
- Custom Post type and Custom taxonomy with URL rewrite worked but template did not
- Rewrite Slug for CPT Archive Pages to Plural Name of Slug
- Change author base slug for different roles
- How to add custom rewrite rule to .htaccess?
- Problem with add_rewrite_rule and pagination (paged and page query_vars)
- Custom Permalinks for Blog Posts Only
- How to show the same content on multiple URLs?
- Using a page template without a page
- How to seamlessly redirect between different archive and singular slugs?
- Overwrite rewrite-slug of built in post-type ‘post’
- Why does wordpress still strip my query var?
- When to call `add_rewrite_rule` for safety
- How would I leverage custom Taxonomies in this scenario?
- URL rewrites and pagination
- Rewrite rules goes away
- Rewrite Rule for Post “Subpage”, with pagination
- unexpected problem in url rewrite
- Need to make a php file inside theme accessible via url
- Rewrite loading custom template file but is_home() returns true, and there’s no 404
- Rewrite rule for admin-ajax.php
- Cache issues with redis and nginx
- Rewrite WordPress Custom URL
- WordPress removes spaces in URL on pagination
- Adding more pages to author pages
- How to check current URL for endpoint in a template file?
- add_rewrite_rule not working for language specific characters
- Add query string to url and display it as normal url part /folder/
- Is it possible to remove feeds from rewrites?
- Flush Rewrite Rules on init or rest_api_init?
- WordPress .htaccess – route other URLs to another app
- Rewrite URL – insert custom variables as a directory path
- How to properly rewrite url by custom var
- Can’t add external rewrites
- Conditional regex in add_rewrite_rule() for specific query filters & pagination
- How to use URL structure to call PHP code
- Can I have /blog and /foo and /bar all point to the same blog?
- Append a value to a certain page’s URL before page load
- How do I retain url parameters the entire time a user browses my site?
- Cannot access wp-admin without trailing slash – .htaccess configuration for WordPress behind a nginx proxy
- Wildcard forward all posts and pages with few exceptions
- Help with Rewrite Rule for Custom Post Type with Query String
- Create Dynamic SEO Friendly URL for Virtual Page
- add_rewrite_rule with query variables
- WordPress author url to alias domain url? domain.com/author/{username}/
- Replace specific middle part of url
- Rewriting a subdomain page on one WordPress installation to a parent domain on another
- How to redirect large amount of URLs?
- How to achieve my custom post url structure?
- How to create a front end user profile with a friendly permalink and a 404 trigger
- Rewrite URL for single category
- Attachment page gives 404 if user not logged
- How to get list of taxonomy slugs ordered parents>childs?
- Rewrites: .htaccess or wp_rewrite for bulk 301 changes?
- How to change the Author Slug from Username to Nickname and deal with Special Characters
- Customise particular RSS permalink
- RSS feed rewrite matching wrong rule
- Removing “www” from a site URL
- Custom rewrite rule not working
- Thousands of 404 errors on old posts due to embedded links
- WP Rewrite for a custom variable
- Creating a folder structure
- How to Detect That WP is Using Mod Rewrite or $_GET variables?
- How can I allow trailing slashes on some URLs without a redirect, but not on others?
- Can’t use a specific custom URL (slug)?
- How do I get posts to appear at mydomain.com/blog?
- rewrite rules and capturing
- Adding the amp url prefix to the beginning
- Redirect to new domain that serves new and different content
- How to change search page url so that it still returns a page when there’s no search query specified?
- How to set the same base url for two different taxonomies?
- Custom permalink structure for custom post types including multiple taxonomy
- How to redirect to a login virtual page?
- Multiple permalink with and without category for same post
- Custom Params in URL
- Help adding custom url, rewrite_rules_array
- Broken page redirect
- Add query arg for pretty permalinks in wordpress way
- How to add 2 variable rewrite rule?
- Get custom posts by segment of the URL
- Add ReWrite from Old Pages to WordPress (remove .php)
- Remove trailing slash
- Rewrite Url to a SEO-friendly format
- Use Parent Pages for URL Structure without Landing Page
- Fully mask *all* traces of WordPress installation subdirectory?
- Appending parameters to WordPress query string in backend
- rewrite rule of post when accessed from archives pages
- Rewrite Question
- Change the search URL
- Add rewrite endpoint and .htaccess
- Remove url parameter using wordpress
- Wrong rewrite rules
- How to make custom WordPress page deliver search results
- URI rewriting: handling one page
- Problems Implementing Non-WordPress Rewrite Rules