get_query_var( string $var, mixed $default = '' )

Retrieve variable in the WP_Query class.

25 related functions found for: get_query_var

Top ↑

Related terms found for this post

wp-parser-related-wordsget, queri, query, query-php, var, wp-includes
wp-parser-packageQuery, WordPress

Top ↑

Terms Used Terms Used

Terms used in the related posts query

  • get
  • queri
  • query
  • Query
  • query-php
  • var
  • wp-includes
  • wp-includes/query.php

Top ↑

Description Description

Top ↑

Parameters Parameters


(string) (Required) The variable key to retrieve.


(mixed) (Optional) Value to return if the query variable is not set.

Default value: ''

Top ↑

Return Return

(mixed) Contents of the query variable.

Top ↑

Source Source

File: wp-includes/query.php


Top ↑

Changelog Changelog

Version Description
3.9.0 The $default argument was introduced.
1.5.0 Introduced.

Top ↑

User Contributed Notes User Contributed Notes

You must log in before being able to contribute a note or feedback.