WordPress.org

Codex

Attention Interested in functions, hooks, classes, or methods? Check out the new WordPress Code Reference!

Function Reference/set query var

Description

set_query_var is a wrapper function to the global $wp_query that uses the method set.

Usage

<?php set_query_var$var$value ?>

Parameters

$var
(string) (required) Query variable key.
Default: None
$value
(mixed) (required) Query Value.
Default: None

Return

(void) 

Change Log

Source File

wp-includes/query.php

Related

See also get_query_var for the opposite action. Class_Reference/WP_Query

This page is marked as incomplete. You can help Codex by expanding it.