最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

Modify wordpress search to search only pages and load matched page not search results

programmeradmin2浏览0评论

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.

发布评论

评论列表(0)

  1. 暂无评论