best practice for query string values – get_query_var always empty for my value supplied in query string
You get the exact unchanged value with: $event_id = filter_input( INPUT_GET, ‘event_post_id’, FILTER_VALIDATE_INT ); Here I added the validation filter directly, but you can even move that to separate code for more complex cases. WordPress’ query variable handling is for cases in which you want to allow changes to the values before they reach your … Read more