This isn’t possible without modifying a core file. The function WordPress uses for this is called sanitize_title_with_dashes
You can find it in wp-includes/formatting.php on
It doesn’t offer any filters, so you will need to make a change to this line:
$title = str_replace( array( '%c2%a0', '%e2%80%93', '%e2%80%94' ), '-', $title );
I wouldn’t recommend modifying core WordPress files at all, so if you do this, be sure to try it out on a test site before implementing it – and even then make sure you have everything backed up.
Related Posts:
- Use a template file for a specific url without creating a page
- Using the Rewrite API to Construct a RESTful URL
- Adding rewrite endpoint breaks static front page
- Unique URL Every Time
- Rewrite default post type
- Rewrite Rules for Multiple (more than 2) Taxonomies
- How to add dot(“.”) in post slug
- add_rewrite_rule not loading correct page nor getting variables
- How to remove “admin.php?page=” from wp-admin using .htaccess?
- Changing directory and/or URL structure
- How do I add a add_rewrite_rule without it redirecting?
- Blog installed in subdirectory but need to create pages in root. How to use permalinks?
- Pretty URLs or permalinks for attachments
- How to prepend route with /blog for blog listing page only
- Need help with a custom rewrite rule – http://domain/custom post slug/replies
- Why is there /index.php/ in all my links? How do I remove it?
- Server (WordPress) redirects files that are not supposed to (using htaccess)
- Dynamically redirect page based on URL?
- Changing WordPress blog name and web address
- htaccess: Remove trailing slash from URL ending with .xml/ only
- Why is WP creating both “/?tag=” and “/tag/” URLS for same content?
- Using Blog Parent Slug on Blog Posts Only
- Regionalised Content
- Custom URL rewrite to specific page template
- Changing the search URL?
- Plugin action rewrite rule – non_wp_rules
- Map alt domain to specific section of website w/o MU
- Get the category is not working on url
- Remap URLs from Relative to Absolute
- Have two different URLs show the homepage
- Posting with slug “favicon” gets redirected
- Help with static front page blog at /blog
- Double domain name in category URL-s
- Access files at new location using old file paths
- Adding special characters to slug?
- WP is ignoring .htaccess rewritten URL
- a one-off rewrite rule
- Get url-friendly version of the_title?
- Rewrite ugly URL to clean URL
- Url rewrite on index.php?term=[term_name]
- Translate custom post type and taxonomy slug in URL?
- Change pagination url format
- Rewrite: WordPress URL rewrite on Search
- WPML language switcher for custom rewrite rules
- How can I change the permalink of a translated home page?
- How to write Rewrite rule for same path using Rewrite API?
- Add word to permalink when custom field has a value
- simple add_rewrite_rule added, refuses to work
- 301 Redirect all posts urls from .html to / (without .html)
- Custom rewrite after the default term link URL
- Capturing /page-name/[0-99999] in both template and number
- custom wordpress rewrite
- Keep requested/entered url with add_rewrite_rule
- Get wordpress installation folder
- Disable WordPress from changing URL slug when post is published
- Two sets of url one content?
- Rewrite Rule for homepage not working correctly
- Remove wp-admin from the URL
- WordPress .htaccess ignore path and subsequent .htaccess files in subfolders
- Adding Rewrite URL for Base + Children Separately
- How to customize sub-URLs in a wordpress website (.htaccess)
- Rewriting a date hierarchy into a ‘yyyy-mm-dd’ slug
- URL rewrite( I think? )
- custom url – add attachment’s id or name after post
- Help with WordPress custom url rewriting?
- Page not found: Custom search form with a custom search page
- WordPress how to prevent URL encoding in URL of taxonomy terms
- loading images, css and fonts from site url
- Query vars to return the homepage
- dynamic URL rewrite
- Remove part from dynamic url and redirect
- Rewrite rule can’t get the ID from rewrited
- How to Update / Change URL when Popup Modal Loads?
- How wordpress core include search.php with $_GET[‘s’]?
- Dynamic Content w/ geolocation in WP?
- Routing in WordPress
- url redirect none www to www
- Stop wordpress from prettify URL
- How to remove Base URL Duplication?
- Rewrite URL query string for all pages
- ModRewrite not working properly
- Need help with custom rewrite rule
- WordPress doesn’t remember my custom rewrite rule
- Custom urls in WordPress involving page slugs
- Relative URL filtering
- how to change some of the rules in the database
- Rewriting URLs with query strings and preserving them
- get_permalink is getting old rewrite rule
- Custom Rewrite for Profiles
- Pagination posts. Url format
- how rewrite is working in wordpress
- How to prevent URL-modification when page title contains digits only?
- How do I display a friendly URL link in the frontend?
- rewriting an Url
- WordPress Post url encoding problem
- Please give me the rewrite rules for my ugly urls
- Spurious URL structure (Adding extra /0/s)
- Programmatically add a custom url route “/category/index.json” to return a collection of posts in json
- WP-Include rewrite directory
- WordPress is adding pagination for all pages like www.example.com/page/123. How to remove that?