This should cover everything:
function wpa_rewite_translate(){
global $wp_rewrite;
$wp_rewrite->pagination_base="pagina";
$wp_rewrite->author_base="autor";
$wp_rewrite->comments_base="comentarios";
$wp_rewrite->feed_base="alimentar";
$wp_rewrite->search_base="busqueda";
$wp_rewrite->set_category_base( 'categoria/' );
$wp_rewrite->set_tag_base( 'etiqueta/' );
}
add_action( 'init', 'wpa_rewite_translate' );
Feel free to laugh at my translations, haha.
Also, to flush rewrite rules when your theme is activated, add this:
function wpa_flush_rewite(){
flush_rewrite_rules();
}
add_action( 'after_switch_theme', 'wpa_flush_rewite' );
Related Posts:
- How to create custom URL routes?
- How to change default page slug?
- Mod_rewrite delete parameter in 301 Redirect
- Need to make a php file inside theme accessible via url
- Evaluating a external rewrite rule before internal wordpress rewrite rule
- Multiple Permalinks for Same Post
- Rewrite rule to load images from production does nothing
- Rewrite Rules Are Redirecting and Not Passing VARs
- WordPress rewrite rules don’t need ^?
- Custom rewrite not working
- WP is ignoring .htaccess rewritten URL
- Rewrite wp-login.php URLS to static pages?
- Rewrite custom post type URL parameters
- Rewrite URLs – Custom Post Type – Post Slug, Taxonamy Slug
- URL Rewriting for PHP script on an image URL
- Change pagination url format
- Rewriting “pretty” blog category URL with htaccess / add_rewrite_rule() causes 404 page
- Custom Rewrite rule to captured post (rewrite rule to rewrite rule)
- URL rewriting with custom user meta “/%shop_name%/gallery/%gallery%”
- How can I create custom URL routes?
- How do I make WordPress revise an .htaccess file a certain way?
- How to change an existing wordpress page rewrite rule?
- Pretty URL via Rewrite
- Custom Rewrite for Profiles
- help with rewrite_tag and rewrite_rule for custom page GET variables [duplicate]
- Can’t get pretty permalinks to work without index.php
- How do you create a “virtual” page in WordPress
- remove “index.php” from permalinks
- Rewrite rules not working in WordPress
- How to add custom rewrite rule to .htaccess?
- Preserving $_GET parameter while using custom Rewrite Rule
- Taxonomy rewrite question
- Why does wordpress still strip my query var?
- When to call `add_rewrite_rule` for safety
- Getting add_rewrite_rule and add_rewrite_tag to work
- Rewrite Rule for Custom Page with Query Vars in URL
- Dynamic URL, not a physical page within the database
- Rewrite Rule for Post “Subpage”, with pagination
- WP Rewrite the last two parts of the URL
- Nginx rewrite rule conflict with WordPress permalinks rule
- Access $_POST data after redirect
- Change Query String to pretty permalink
- How to add a custom redirect rule for subdomains?
- How to do Basic URL Rewrite Without Redirecting
- URL Rewrite doesn’t work for nested pages
- How to properly rewrite url by custom var
- Using custom mod_rewrite without breaking wordpress permalinks
- url rewrite parsing a custom url parameter not working
- How to add custom variable in url without redirect?
- Using category slug in add_rewrite rule
- add_rewrite_rule ignoring other params than the “p” param
- Url Rewriting a dynamic wordpress page
- How to catch Rewrite rules then display a specific post?
- Adding two rewrite rules
- Load an url with minimal/no DB queries
- Monkey Man Rewrite Analyzer says my rule will trigger but it doesn’t [closed]
- ReWriteRules and WordPress Multi-Sites with Sub Directories
- .htaccess rewrite
- Auto generate rewrite rules for multiple taxonomies
- Change htaccess to redirect to index.php in subfolder
- How to remove specific category from URL in WordPress
- How to redirect specific URL to Subdomain
- How to rewrite wordpress urls with index.php in them
- Taxonomy Pagination Rewrite
- Rewrite query string to path
- Rewrite API -Adding a parameter before the slug
- Multiple query vars sorting combination and url rewrite
- WordPress keeps writing rewrite rules to .htaccess
- Changing URL scheme, mod_rewrite not helping
- Rewrites rules disappear after a while
- Adding a rewrite rule to page that has no fixed variables and pagination
- Flush rewrite rules on option update with Settings API
- Requested URL changes when using custom rewrite rule
- Rewrite specific action url
- Using URL rewrite to add custom URL for custom post type
- WordPress simple Url Rewrite
- Custom rewrite rule not working
- Rewriting in wordpress url
- Why is a rewrite rule in wordpress prevent pagination?
- Rewrite custom taxonomy slug – but only parent items
- How can I allow trailing slashes on some URLs without a redirect, but not on others?
- Adding the amp url prefix to the beginning
- wordpress path generation from rewrite rule
- Rewrite WordPress Url from root to subfolder without moving files
- How to redirect to a login virtual page?
- Ugly URLs when there’s pagination
- How do I rewrite URL that has custom parameter
- Why is there a 404 on page 2+ for my search page?
- Rewrite rule for post as a child of a CPT
- Broken page redirect
- URL Rewrite and Archive Template Files – Post Type vs. Taxonomy
- add_rewrite Rule
- rewrite rule of post when accessed from archives pages
- .htaccess RewriteBase equivalent for WordPress – Passing a URL as a variable without getting a 404
- URL Rewrite for CPT single posts
- Migration from old CMS to WordPress 301 redirection rules?
- How to make a custom route with any-string-part/number-part pointing to an existing page?
- Using add_rewrite_tag to create urls for page sections
- Rewriting WordPress URLs
- Function to rewrite URl in WordPress