Home › Forums › Product Support Forums › Ajax Search Pro for WordPress Support › Search engine replacement
This topic contains 1 reply, has 2 voices, and was last updated by Ernest Marcinko 4 years, 1 month ago.
- AuthorPosts
- April 23, 2019 at 12:14 pm #22270
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
April 23, 2019 at 12:55 pm #22272Hi 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.
Best,
Ernest Marcinko
If you like my products, don't forget to rate them on codecanyon :)
- AuthorPosts
You must be logged in to reply to this topic.