add_query_arg

add_query_arg ( No parameters )

Parameters:
  • (mixed) $param1 Either newkey or an associative_array
  • (mixed) $param2 Either newvalue or oldquery or uri
  • (mixed) $param3 Optional. Old query or uri
Returns:
  • (string) New URL query string.
Defined at:

Description

Retrieve a modified URL query string.

You can rebuild the URL and append a new query variable to the URL query by using this function. You can also retrieve the full URL with query data.

Adding a single key & value or an associative array. Setting a key value to an empty string removes the key. Omitting oldquery_or_uri uses the $_SERVER value. Additional values provided are expected to be encoded appropriately with urlencode() or rawurlencode().

Related Functions

add_users_page, add_user_meta, get_query_var, set_query_var, remove_query_arg

Top Google Results

User discussions

wpseek mobile