Forums Forums Search & Filter Pro Forward query from search box in header of theme to filter search form

Viewing 3 posts - 1 through 3 (of 3 total)
  • Anonymous
    #46885

    Hello all,
    I wish to have a search box in my header to start a query. After running the search the user should be forwarded to the search results page, with further filters in the left sidebar. The query therefor should be handed over to the form the search form in the header to the one crated with this plugin.
    In my header I have a searchfield:

    <form method="get" class="searchform themeform" action="<?php echo home_url('/'); ?>">
    <div class="header-searchfield">
    <input type="text" class="search" name="s" onblur="if(this.value=='')this.value='<?php _e(' Suchst du nach etwas?...','hueman'); ?>';" onfocus="if(this.value=='<?php _e(' Suchst du nach etwas?...','hueman'); ?>')this.value='';" value="<?php _e(' Suchst du nach etwas?...','hueman'); ?>" />
    </div>
    </form>

    And with Search and Filter I set up a search from based on the archive page “search.php” and I also tried a static page “Search results” with short code. Which is better to use in this case?

    How do I have to adjust the code so the query typed in the header also appears in the search field of the search form search and filter?

    Trevor
    #46899

    Ah, in the Header is the theme search?

    The last user I had this same question (exact same question) they edited the theme header and placed a search & Filter in the header template (using the shortcode by using the WordPress do_shortcode function), and that form was using the as an archive method, to the search results page, on which there was a different and more detailed search form and the results. It worked fine.

    Anonymous
    #46907

    Thanks for the quick respond. The forward with the Archive page worked in general, but not for me as I have another problem then. But I could also solve it that way, that I create another form as you said and linked that to my search results page, where the short code of my more detailed search form was insert. So the first field just opens the result page and starts directly with the results of the second.

    Works perfekt. Resolved. Thanks

Viewing 3 posts - 1 through 3 (of 3 total)