Add query arguments

In the Survival WordPress plugin settings, administrators have the option to specify a URL for a Survival overview page. When a page is defined in the settings, the URL is utilized to create a reference to a specific survival.

Example URL

URL = https://byteway.eu/bso-survival/survival/

To create a link to a specific survival, the URL requires certain query variables.

Example query

SurvivalId = 1

Solution

add_query_arg( array(
'SurvivalId' => '1',
), 'https://byteway.eu/bso-survival/survival/' );

Leads to:

https://byteway.eu/bso-survival/survival/?SurvivalId=1

See also WordPress help.