get_query_var


get_query_var ( $query_var, $default_value = '' )

Parameters:
  • (string) query_var The variable key to retrieve.
  • (mixed) default_value Optional. Value to return if the query variable is not set. Default empty string.
Returns:
  • (mixed) Contents of the query variable.
Defined at:
Change Log:
  • 3: .

Description

Retrieves the value of a query variable in the WP_Query class.

Related Functions

set_query_var, get_query_template, add_query_arg, get_user_meta, remove_query_arg

Top Google Results

User discussions

wpseek mobile