WordPress.org

Codex

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

Plugin API/Filter Reference/query vars

Description

Allows query vars to be added, removed, or changed prior to executing the query.

Example

function themeslug_query_vars( $qvars ) {
  $qvars[] = 'custom_query_var';
  return $qvars;
}
add_filter( 'query_vars', 'themeslug_query_vars' );
This page is marked as incomplete. You can help Codex by expanding it.