get_query_var


get_query_var ( $var, $default = '' )

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

Description

Retrieve variable in the WP_Query class.

Related Functions

set_query_var, get_query_template, remove_query_arg, get_user_meta, add_query_arg

Top Google Results

User discussions

wpseek mobile