These are Relevanssi results: https://www.gameshome.com.sg/?s=thrustmaster&post_type=product
These are too: https://www.gameshome.com.sg/?s=thrustmaster&post_type=product&tags=0&limit=10&ixwps=1 – the extra parameters do not matter, Relevanssi will just discard them.
The AJAX search is not powered by Relevanssi. Most AJAX searches are not. SearchWP Live Ajax search uses Relevanssi.
These are also Relevanssi results: https://www.gameshome.com.sg/?s=thrustmaster&post_type%5B%5D=post –?just nothing found, because you have no posts with the word “thrustmaster” in them.
https://www.gameshome.com.sg/?s=thrustmaster&post_type%5B%5D=product doesn’t look right, because there’s extra garbage in the URL: that %5B%5D prevents your theme from recognizing the post type. Your theme shows the product search when post_type
is set to “product”. Looks like Relevanssi doesn’t care about the garbage in the URL, but your theme does, hence the right results but the wrong look.
Your second search box has this:
<input type="hidden" name="post_type[]" value="post">
It’s those square brackets: your theme doesn’t like them. Remove them, and change post
to product
to get a working product search.
2. With the basic search widget, you can’t customize much. It’s what it is. If you want more customization, use a HTML widget and create your own search form. A basic search form looks like this:
<form role="search" method="get" id="searchform" class="searchform" action="https://www.example.com/">
<label class="screen-reader-text" for="s">Search for:</label>
<input type="text" value="" name="s" id="s" />
<input type="submit" id="searchsubmit" value="Search" />
</form>
so you can start with that and customize from there.
3. With Relevanssi Premium, you’d get some easy tools: you can pin posts so that when a certain keyword is used, that post comes up first. You can also give a boost for new posts, so that posts published within, say, a week, get a big boost.
Without Relevanssi Premium, there are no easy tools to do that, but it’s possible to do lots of custom ordering with relevanssi_hits_filter
filter hook; that just takes some skill with PHP and WordPress development.
4. Not a Relevanssi question. This is best done by editing your search results template. The search keyword can be found in get_search_query(), so you can add something like this in your template:
if (get_search_query() === "thrustmaster") {
echo "<img src='https://www.example.com/thrustmaster-banner.jpg' alt='Thrustmaster banner' />";
}
That would print out an image if the search term is “thrustmaster”.
The key here is that you do have Relevanssi working. The search is being powered by Relevanssi. There are just all sorts of extra trappings around it.