WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Variable $s in searchform.php (3 posts)

  1. lxg
    Member
    Posted 7 years ago #

    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?

  2. lxg
    Member
    Posted 7 years ago #

    Anybody has an idea?

  3. lxg
    Member
    Posted 7 years ago #

    Ok, solved it myself... it actually is derived from $_GET['s'], but it has to be altered early.

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.