Redirect posts to post editor page based on query string
Implementation notes: You need to use that function with an appropriate action hook. For example, template_redirect hook can be used here. If you want URL to have ?edit, then empty check is not necessary, if you want URL to have something like ?edit=1, then use ! empty check. Check and ignore if we are already … Read more