is there a way to select what to show first on the suggestion example. on our site you can search for Book author name like “Vincenzi”, can we show books( product) 1st and then author name (attribute)?
The page I need help with: [log in to see the link]
In fact it already must be higher in the search results. Words in title prioritize higher than the words inside other fields like attribute or product description. Also you can add even more relevance to words inside the title with some custom code snippets.
You need to add it somewhere outside the plugins folder. For example, inside functions.php file of your theme or use some plugin for adding code snippets.
Also, after adding this code you will need to go to the plugin settings page and click the ‘Clear cache’ button.
sorry maybe my sentence was wrong, i would like to have product made by that author to come 1st in the result even if they don’t have that specific word in the title. again with my example. Atuthor ahve 7 different books, but the query gives Author full name suggestion as 1st, other author that partially have same name and after all that, all books that have that name in one of their attribute.
i would like to have this item to be show in the suggested result in an higer position than the Name of authors
So to sum up you want the following – if a user searches for the author’s name – show a product that is published by this author first? Is that correct?
Another question – author name is set via default WordPress author field or are you using any specific custom field for it?
So in this case your issue can be solved by adding more relevance to words inside that author attribute. Please tell me the exact name of this attribute so I can help you with needed code snippets.
one of her book appear inside the search as 1st result of products but probably because have the word “vincenzi” inside product description (bold word on search suggestion).
So if after searching for Vincenzi it shows some results with Vincenzo – please go to the plugin settings page and turn on ‘Misspelling fix’ option. Perhaps this will help.
Also previously you mentioned that the author name is stored inside the product attribute. Is it pa_autore ?