admin管理员组

文章数量:1425670

I am currently working on na project which requires a modification to wordpress search functionality.

I would like to modify it in this manner

  • to make wordpress search only page titles.
  • to make search bar auto suggest page titles when a user begins to type on the search bar textfield.
  • once a matching page title is selected by user from the autosuggest drop down and searched, the corresponding page is loaded and not wordpress search result page.
  • possibility of also displaying most frequently searched pages in Autosuggest drop down.

I have been able to find a code snippet for functions.php file to limit search to page titles.

I have also setup elastic search and installed elastic press plugin for the site. Wanted to use this for autosuggest functionality and other features I might implement in future.

That is the much i have done. I really need help with the last two features i listed.

Much help will be highly appreciated. Thanks.

本文标签: Modify wordpress search to search only pages and load matched page not search results