• Hello,
    I just downloaded Relevanssi today and having troubles getting any search results. I’ve read some of the help forums in regards to the query_posts() in a search.php file…..I’m having trouble locating this search.php file on the back end. When I do a navigation search for search.php. These are my results.

    /public_html/wp-content/plugins/relevanssi/lib/search.php
    /public_html/wp-content/plugins/jigoshop/widgets/product_search.php
    /public_html/wp-content/plugins/jetpack/modules/omnisearch.php
    /public_html/wp-content/plugins/jetpack/modules/contact-form/grunion-omnisearch.php

    Are any of these files something I should be looking at?

    https://wordpress.org/plugins/relevanssi/

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author Mikko Saari

    (@msaari)

    No.

    /public_html/wp-content/themes/your_theme/search.php is the place to go.

    Thread Starter dickey1

    (@dickey1)

    Thank you for that help, I was able to successfully find a file called searchform.php for my theme…..and here is the code for the file:

    <form role=”search” method=”get” id=”searchform” action=”<?php echo home_url( ‘/’ ); ?>”>
    <div><label class=”screen-reader-text” for=”s”><?php echo apply_filters( ‘yiw_searchform_label’, __( ‘Search for:’, ‘yiw’ ) ) ?></label>
    <input type=”text” value=”<?php the_search_query(); ?>” name=”s” id=”s” />
    <input type=”submit” id=”searchsubmit” value=”<?php echo apply_filters( ‘yiw_searchform_submit_label’, __( ‘Search’, ‘yiw’ ) ) ?>” />
    <input type=”hidden” name=”post_type” value=”<?php echo apply_filters( ‘yiw_searchform_post_type’, ‘post’ ) ?>” />
    </div>
    </form>

    In a help article, it mentioned, “See if there’s a call to query_posts() and if there is, comment it out. In most cases that is enough to fix the problem.” I don’t know what I’m looking for in the code above to comment out. I see something for search query() but don’t know what to delete. Could anyone offer me some help? I appreciate any help! Thank you!

    Plugin Author Mikko Saari

    (@msaari)

    That’s not the right template. searchform.php is the search form, not the search results. The template should be called search.php, but if there isn’t one in your theme folder, then your theme is handling it some other way.

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

The topic ‘Search Results Aren't Working’ is closed to new replies.