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

TaxonomyTerms
wp-parser-related-wordsget, queri, query, query-php, var, wp-includes
wp-parser-packageQuery, WordPress
wp-parser-source-filewp-includes/query.php

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

$var

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

$default

(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

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.