+ Character in permalink

Per the OP, here is their answer which I separated from the question:

I have found a solution for it myself, I’ve used the Custom Permalinks plugin and edited how the special characters are saved in the database. For the people who want to use this, change:

add_post_meta( $id, 'custom_permalink', str_replace('%2F', "https://wordpress.stackexchange.com/",
urlencode(ltrim(stripcslashes($_REQUEST['custom_permalink']),"https://wordpress.stackexchange.com/"))) );

to

add_post_meta( $id, 'custom_permalink', str_replace(array('%2F','%2B'),
array("https://wordpress.stackexchange.com/",'+'),
urlencode(ltrim(stripcslashes($_REQUEST['custom_permalink']),"https://wordpress.stackexchange.com/"))) );

Leave a Comment