Title: Variable $s in searchform.php
Last modified: August 18, 2016

---

# Variable $s in searchform.php

 *  Resolved [lxg](https://wordpress.org/support/users/mastermind/)
 * (@mastermind)
 * [19 years, 8 months ago](https://wordpress.org/support/topic/variable-s-in-searchformphp/)
 * In the searchform.php of the default template and in many other templates, the
   search request is returned to the search form with the variable $s.
 * I would like to change its value within a plugin, but I couldn’t seem to find
   out where it is set. It seems not to be $_GET[‘s’] and not $wp_query->query_vars[‘
   s’].
 * Does somebody have an idea where that $s comes from?

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Thread Starter [lxg](https://wordpress.org/support/users/mastermind/)
 * (@mastermind)
 * [19 years, 8 months ago](https://wordpress.org/support/topic/variable-s-in-searchformphp/#post-463998)
 * Anybody has an idea?
 *  Thread Starter [lxg](https://wordpress.org/support/users/mastermind/)
 * (@mastermind)
 * [19 years, 8 months ago](https://wordpress.org/support/topic/variable-s-in-searchformphp/#post-464013)
 * Ok, solved it myself… it actually _is_ derived from $_GET[‘s’], but it has to
   be altered early.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Variable $s in searchform.php’ is closed to new replies.

 * 2 replies
 * 1 participant
 * Last reply from: [lxg](https://wordpress.org/support/users/mastermind/)
 * Last activity: [19 years, 8 months ago](https://wordpress.org/support/topic/variable-s-in-searchformphp/#post-464013)
 * Status: resolved

## Topics

### Topics with no replies

### Non-support topics

### Resolved topics

### Unresolved topics

### All topics
