I want to rewrite the URL of a specific post with a specific custom field to easily analyze in Google Analytics

I would stick to make the url https://example.com/life/life-article/?special=1 I would create a php function that: retrives all posts and stores them in a variable; make a loop to loop all the posts and check if they are “life” posts; inside the same loop, if they are “life” posts, change their slug to …whatever/?special=1; and then … Read more

Remove character from permalink

to achieve that is not easy, this to say almost impossible, the permalinks are made by the slugs, and the slugs have a function called sanitize_tittle(), this is probably what is doing that to your permalink. A slug consists of solely lowercase alphanumeric characters, dashes and underscores, without 2 or more dashes in a row … Read more