This website uses cookies to personalize your experience. By using this website you agree to our cookie policy.

Search engine replacement

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #22270
    MarcSavallMarcSavall
    Participant

    Hi

    1) I would like to replace the original search engine in the header by your AJAX Search engine (very very good engine !) I tried several things but my theme “UPSTORE” seems to be capricious.
    I don’t know exactly what to change :

    /greennature/wp-content/themes/upstore/templates/headers/header_v4.php

    <div class=”header-middle”>
    <div class=”container”>
    <div class=”logo-wrapper”><?php echo upstore_theme_logo(); ?></div>

    <?php if( $theme_options[‘ts_enable_search’] ): ?>
    <div class=”search-wrapper”><?php upstore_get_search_form_by_category(); ?></div>
    <?php endif; ?>
    </div>
    </div>

    /greennature/wp-content/themes/upstore/searchform.php

    <form method=”get” action=”<?php echo esc_url( home_url( ‘/’ ) ); ?>” id=”searchform<?php echo esc_attr($rand_id); ?>”>
    <div class=”search-table”>
    <div class=”search-field search-content”>
    <input type=”text” value=”<?php echo get_search_query(); ?>” name=”s” id=”s<?php echo esc_attr($rand_id); ?>” placeholder=”<?php echo esc_attr($placeholder_text); ?>” autocomplete=”off” />
    <?php if( class_exists(‘WooCommerce’) ): ?>
    <input type=”hidden” name=”post_type” value=”product” />
    <?php endif; ?>
    </div>
    <div class=”search-button”>
    <input type=”submit” id=”searchsubmit<?php echo esc_attr($rand_id); ?>” value=”<?php esc_attr_e(‘Search’, ‘upstore’); ?>” />
    </div>
    </div>
    </form>

    2) I used in woocommerce GTIN and SKU codes. I have tries to write them in HTML comment (<!– –>) so that it can be indexed but, it doen’t work. It works with original woocommerce search engine but not with AJAX Search Pro.
    I tried too with an HTML Widget. It doen’t work either.

    Best regards

    Marc

    #22272
    Ernest MarcinkoErnest Marcinko
    Keymaster

    Hi Marc!

    1. Well, it is very hard to tell, but based on these two code sections, I would say it is probably the first one. I would try changing this line:

    <div class='search-wrapper'><?php upstore_get_search_form_by_category(); ?></div>

    ..to this:

    <div class='search-wrapper'><?php echo do_shortcode('[wpdreams_ajaxsearchpro id=1]'); ?></div>

    If that is the correct file, then this should do the trick.

    2. The SKU should be stored within the _sku custom field, make sure that is selected for searching/indexing within the plugin options. The GTIN must have a similar custom field, so make sure to search for that one as well. That should resolve that problem.

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.