Passing multiple variables through url (php)

I’m assuming these are the post details the you’re trying to pass through the URL. Not sure if that is the most effective way to go about doing this. I do the same type of thing, but pass the postID through the URL and when I get to the destination page, use the postID to collect the necessary information. If you’re working with multisite, make sure to also pass the blogID and then you can get the title, publish date and all the other information that is adding the crazy characters.

All-in-all it’s not great practice to pass all that info via url, so I’d suggest only passing what you absolutely need.

Also, make sure you have declared your custom variable in functions.php so you can use in your URL. That is done like so:

add_action('init','add_variables'); 
function add_variables() {
  global $wp; 
  $wp->add_query_var('my_error');
}