WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How can I change the - to a + in the URLs, automatically?

share|improve this question
Do you want to do it manually or automatically when the post is created? – Anagio Mar 12 '13 at 7:33
yes automatically – user2128747 Mar 12 '13 at 7:47
What is your permalink structure (update your question please)? – kaiser Mar 12 '13 at 8:41
have you tried custom structure in Permalink settings? – MidhuN Mar 12 '13 at 8:47

The post slug is generated in the wp_insert_post (…/wp-includes/post.php) function. The function calls another function to sanitize the your post title. You can use the filter sanitize_title (…/wp-includes/formatting.php) to replace - by +. This will change the behavior in more situations then just the title of a post. So you should check if it is a post title that is sanitized.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.