0

i'm creating a Reference website, in this website there are many texts about some knowledge, The main task of this site is to find the keywords (or words close to them) in the content ,And search results are based on words, not the whole text. some lines before and after the keyword, and if the user wants to see the full text enter to it , and if the keyword has been used more, the results will be displayed it individually.My problem is that I do not know much coding, and all the plugins only show the whole text from the beginning in the results. I'm currently using the search&filter plugin.

this site has done what i want This site they show the keyword after each result and you can see every keyword in a content,and after the keyword you can see the words that close to the keyword

  • Google Custom Search – Max Yudin Feb 23 '18 at 12:14
  • i need more options like desired tags or categories and dropdown and .. which only Search & filter has this, cause i used almost all plugins until i found this – user3573285 Feb 23 '18 at 12:41
0

What shows in search results is not always controlled by search plugins. You probably need to adjust your theme. Create a child theme, copy search.php from the parent theme into the child theme, and wherever it calls for the_content() replace that with the_excerpt().

Some search plugins may modify this behavior, so you'll have to do some trial and error, but you can start with out-of-the-box WP search to test and then try a variety of plugins.

If you have budget available, there are several paid search options that allow you to adjust relevancy and weighting of different items like the title, content, etc. Elastic, Swiftype, and others give you a lot more control over your search results without having to have coding knowledge or even adjust your theme - you pick what shows in the serps right in their UI.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.