The recently released EverWeb 3.5 includes two built in widgets that allow your website visitors to search your site: The Search Field widget and the Search Results widget.
The Search Field widget can be used either on its own or together with the Search Results widget. The Search Results widget, however, can only used in conjunction with the Search Field widget. It cannot be used on its own. Both widgets can be used in either a fixed width page layout (e.g. a centered layout) or in a responsive page layout.
Adding the Search Field Widget to The Page
Use the Search Field widget to add a website search bar to your website. For example, the perfect place would be in a Master Page so that the widget is accessible on all the pages attached to the Master Page.
In this example, I am going to use a Responsive Page Layout. Add the Search Field widget by going to the Widgets tab then drag and drop the widget on to the page. You can position the widget as you want to be on the page or do this step later if your page is not complete.
Customizing The Search Field Widget Settings
As you have just added the Search Field widget to the page you should see its Widget Settings in the Inspector Window. We will use these to customize and style the widget.
First, set the language that you want search related messages to be displayed in using the Language field e.g. the message that you want to display if no search results are found.
Next, choose how you want to see the search results using the Search Results field. You have three options: Drop Down Menu, Popup Window or One of My Pages.
When using the Drop Down Menu or Popup Window to display your search results, you can use all of the options except for ‘Search Results Page’ which is used only by the ‘One of My Pages’ option. Customize the settings as you want.
If you check the ‘Use Page Description Text for Summary’ box, the text from the Page Description field in the Page Settings tab will be used as the text summary in the search results. Note that if the Page Description is short, text from the page itself may be added to the description in the search results.
If you have chosen the ‘One of my pages’ option, you will need to use a page in your website to display the search results. This page must include the Search Results widget.
Use the remainder of the options in the Search Field Widget Settings to style the search bar, the search button and the search button when it is moused over.
If you are using the ‘One of my pages’ option, style the Search Results widget using its own Widget Settings options in your search results page.
Setting Up The Pages to Be Used in Search
Once you have finished customizing the Search Field widget, you will need to define the pages that you want to be included in your search results. You will then need set up the words and phrases in your website’s pages that will be used for searching upon.
By default, all pages in your site are included in Search, however, you may want specific pages to be excluded from search results, e.g. directory level pages that are used in navigation menus or 404 Page Not Found pages. To exclude a page from being displayed in the search results, uncheck the ‘Include in Site Search’ option in the Site Search section of the Page Settings tab.
Adding Words To Be Included in Search
Once you have deselected the pages you do not want to include in search, you can add search words or phrases to the pages that you want to be available for search. Use these methods:
- Add Keywords to the Search Engine Optimization section in the Page Settings tab of your page.
- Add Keywords to a blog post by selecting the blog post, then clicking on the Settings Cog. Select ‘Edit’ from the menu then add your Keywords in to the Keywords section.
- Add a Web Page Description for the page.
- In blog posts, use the Short Summary field to enter a description of the post.
- Add your search words in to the text of the page, or blog post.
Add a Web Page Title To Your Page
Make sure to complete the Web Page Title in the Page Settings tab as this is used as the title if the page is found in the search results. If you have search results that have no Web Page Title, these will be displayed with a title of ‘No Title’.
Once you have finished, preview or publish your site to test out your website search!