• Search results appear in a drop down list under the search box, but not on all browsers.

    I have created a search results page > new page > page attributes > search results

    But no joy, the Relevanssi results do not appear, just a message – no results

    Can anyone help?

    Thankyou

    The page I need help with: [log in to see the link]

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

    (@msaari)

    Can you please show me what the search results template (likely search.php in your theme folder) contains?

    Thread Starter FDigital01

    (@fdigital01)

    there is a file searchform.php which contains:
    <form role=”search” method=”get” class=”search_form” action=”<?php echo esc_url( home_url( ‘/’ ) ); ?>”><input type=”text” class=”search_field” placeholder=”<?php _e(‘Search …’, ‘themerex’); ?>” value=”<?php echo esc_attr(get_search_query()); ?>” name=”s” title=”<?php _e(‘Search for:’, ‘themerex’); ?>” /><button type=”submit” class=”search_button icon-search-2″ href=”#”></button></form>

    I think this is what you need. thankyou

    Thread Starter FDigital01

    (@fdigital01)

    Just to confirm what the problem is. The search brings up a drop down box with search results, however, this does not work when pop ups are blocked and if the enter key is hit then the search results page comes up with random entries, bearing no resemblance to the search.

    How do I either completely turn off the drop down and/or ensure that when the enter key is hit the correct search results appear on the search page.

    thankyou

    Plugin Author Mikko Saari

    (@msaari)

    No, that’s the search form. I’d need to see the search results page. That’s likely search.php, but there isn’t a file called search.php, that may be part of the problem.

    You’re using Dave’s Live Search for the dropdown. Last time I checked, that wasn’t compatible with Relevanssi. SearchWP Live Ajax Search is Relevanssi-compatible and I only have good experiences with that one.

    Thread Starter FDigital01

    (@fdigital01)

    This is what i found called serch.php

    <?php
    /**
    * The Template for displaying product archives, including the main shop page which is a post type archive.
    *
    * Override this template by copying it to yourtheme/woocommerce/archive-product.php
    *
    * @author WooThemes
    * @package WooCommerce/Templates
    * @version 2.0.0
    */

    if ( ! defined( ‘ABSPATH’ ) ) {
    exit; // Exit if accessed directly
    }

    get_header( ‘shop’ );

    // add the action

    ?>
    <style type=”text/css”>
    .top_panel_style_light.top_panel_opacity_solid .page_top_wrap{ display:none;}
    </style>
    <script type=”text/javascript”>
    jQuery(document).ready(function(e) {
    jQuery(document.body).addClass(“woocommerce”);
    jQuery(document.body).addClass(“woocommerce-page”);

    });
    </script>

    <?php
    /**
    * woocommerce_before_main_content hook
    *
    * @hooked woocommerce_output_content_wrapper – 10 (outputs opening divs for the content)
    * @hooked woocommerce_breadcrumb – 20
    */
    do_action( ‘woocommerce_before_main_content’ );
    ?>

    <?php if ( apply_filters( ‘woocommerce_show_page_title’, true ) ) : ?>

    <h1 class=”page-title”><?php woocommerce_page_title(); ?></h1>

    <?php endif; ?>

    <?php do_action( ‘woocommerce_archive_description’ ); ?>

    <?php if ( have_posts() ) : ?>

    <?php
    /**
    * woocommerce_before_shop_loop hook
    *
    * @hooked woocommerce_result_count – 20
    * @hooked woocommerce_catalog_ordering – 30
    */
    do_action( ‘woocommerce_before_shop_loop’ );
    ?>

    <?php woocommerce_product_loop_start(); ?>

    <?php woocommerce_product_subcategories(); ?>

    <?php while ( have_posts() ) : the_post(); ?>

    <?php wc_get_template_part( ‘content’, ‘product’ ); ?>

    <?php endwhile; // end of the loop. ?>

    <?php woocommerce_product_loop_end(); ?>

    <?php
    /**
    * woocommerce_after_shop_loop hook
    *
    * @hooked woocommerce_pagination – 10
    */
    do_action( ‘woocommerce_after_shop_loop’ );
    ?>

    <?php elseif ( ! woocommerce_product_subcategories( array( ‘before’ => woocommerce_product_loop_start( false ), ‘after’ => woocommerce_product_loop_end( false ) ) ) ) : ?>

    <?php wc_get_template( ‘loop/no-products-found.php’ ); ?>

    <?php endif; ?>

    <?php
    /**
    * woocommerce_after_main_content hook
    *
    * @hooked woocommerce_output_content_wrapper_end – 10 (outputs closing divs for the content)
    */
    do_action( ‘woocommerce_after_main_content’ );
    ?>

    <?php
    do_action( ‘woocommerce_sidebar’ );
    /**
    * woocommerce_sidebar hook
    *
    * @hooked woocommerce_get_sidebar – 10
    */

    ?>

    <?php

    get_footer( ‘shop’ ); ?>

    <script type=”text/javascript”>

    function readCookie(name) {
    var nameEQ = name + “=”;
    var ca = document.cookie.split(‘;’);
    for(var i=0;i < ca.length;i++) {
    var c = ca[i];
    while (c.charAt(0)==’ ‘) c = c.substring(1,c.length);
    if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
    }
    return null;
    }

    jQuery(document).ready(function(e) {
    var value = readCookie(‘themerex_shop_mode’);
    if(value==”list”){
    jQuery(“ul.products”).removeClass(“grid”);
    jQuery(“ul.products”).addClass(“list”);
    jQuery(“.gridlist-toggle #list”).addClass(“active”);
    jQuery(“.gridlist-toggle #grid”).removeClass(“active”);
    }else if(value==”thumbs”){
    jQuery(“ul.products”).removeClass(“list”);
    jQuery(“ul.products”).addClass(“grid”);
    jQuery(“.gridlist-toggle #grid”).addClass(“active”);
    jQuery(“.gridlist-toggle #list”).removeClass(“active”);
    }
    });
    /*jQuery(window).load(function(e) {

    var themerex_shop_mode = jQuery(“input[name=themerex_shop_mode]”).val();

    jQuery(“ul.products”).removeClass(“grid”);
    jQuery(“ul.products”).removeClass(“list”);
    jQuery(“.gridlist-toggle #grid”).removeClass(“active”);
    jQuery(“.gridlist-toggle #list”).removeClass(“active”);
    alert(themerex_shop_mode);
    if(themerex_shop_mode==”thumbs”){
    jQuery(“ul.products”).addClass(“grid”);
    jQuery(“.gridlist-toggle #grid”).addClass(“active”);
    jQuery(“input[name=themerex_shop_mode]”).val(“list”);

    }else if(themerex_shop_mode==”list”){
    jQuery(“ul.products”).addClass(“list”);
    jQuery(“.gridlist-toggle #list”).addClass(“active”);
    jQuery(“input[name=themerex_shop_mode]”).val(“thumbs”);
    }
    });*/
    </script>

    <?php /*?><script type=”text/javascript”>
    jQuery(document).ready(function(e) {
    jQuery(document.body).addClass(“woocommerce”);
    jQuery(“.woocommerce .products > li”).addClass(“column-1_3”);
    });
    jQuery(window).load(function () {
    jQuery(“.woocommerce .products > li”).removeClass(“first”);
    jQuery(“.woocommerce .products > li”).removeClass(“last”);
    var firstli = 0;
    jQuery(“.woocommerce .products > li”).each( function (index) {
    if(firstli == 0) {
    jQuery(this).addClass(“first”);
    }
    index += 1;
    firstli++;

    if(index % 3 == 0) {
    firstli = 0;
    jQuery(this).addClass(“last”);
    }
    });

    });
    </script>
    <style>
    .article_style_boxed.woocommerce ul.products li.product .post_content, .article_style_boxed.woocommerce-page ul.products li.product .post_content
    {
    background-color: rgb(255, 255, 255) !important;
    padding: 1.25em 1.8em !important;
    }
    .woocommerce-breadcrumb, .woocommerce-result-count, body:not(.single-product) .woocommerce ul.products li.product .button{ display:block !important;}
    .added_to_cart{ display:none !important;}
    </style><?php */?>

    Plugin Author Mikko Saari

    (@msaari)

    Unfortunately that is complicated and non-standard enough that there’s little that can be done here. With that theme, Relevanssi is just not going to work.

    Thread Starter FDigital01

    (@fdigital01)

    Thanks.

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

The topic ‘Cannot Create a Search Results Page’ is closed to new replies.