Administration - Search
Here you can create an unlimited number of search items and use them on your website. Each search item has different options that can be customized to your needs when filtering the calendars availability.
There are a set of conditions for the calendars to be displayed in search results:
- A search can be used only for days or only for hours. If the hours are enabled, only calendars that have availability set for hours will be displayed. If the hours are disabled, in the search settings, only calendars that have availability set for days will be displayed.
- Each calendar needs to have a post/page ID attached to it. Search results display: the post featured image, excerpt (description) and the link of the page/post where the calendar is displayed (this is why the post ID is needed).
You can find the Post ID of a page here:
- If you create a custom post type the post ID is attached automatically, but for calendars that are added in pages using shortcodes you need to add the post/page ID manually.
- To attach the page/post ID manually to a calendar go to: WordPress back end -> Pinpoint Booking System -> Calendars -> Select the calendar -> Edit calendar settings -> enter the ID in Post ID option. To find the post/page ID please read this instructions from WordPress codex.
- For calendars to appear in search map you need to attach them to locations. Please view Locations documentation for more informations.
Create & edit a search item
Add a search item
- Step 1 - Click the plus button to add a new search item.
After you clicked the button, the search item will appear in the list below.
Set a search item data
- Step 1 - Select the search item from the list to display the data.
- Field 2 - Change name.
- Item 3 - Exclude calendars from search. Only calendars that have a post/page ID attached and have availability set only for hours or only for days, depending on search item settings, are displayed.
- Button 4 - Display search item data.
- Button 5 - Display search item settings.
- Button 6 - Delete search item.
Search item settings
- Step 1 - Select the search you want to edit.
- Button 2 - Display search item settings.
- Field 3 - Default value: American. Select date format: American (mm dd, yyyy) or European (dd mm yyyy).
- Field 4 - Default value: default. Select styles template
- Field 5 - Default value: Disabled. Enable the option to filter results by price.
- Field 6 - Default value: List. Select the default view that the search results will first display.
- Field 7 - Default value: Enabled. Enable to display results in list view.
- Field 8 - Default value: Disabled. Enable to display results in grid view.
- Field 9 - Default value: Disabled. Enable to display results on a google map.
- Field 10 - Default value: 10. Set the number of results to display on a page.
- Field 11 - Default value: Left. Set filters sidebar position: Left, Right and Top.
- Field 12 - Default value: United States Dollar ($, USD). Select search default currency.
- Field 13 - Default value: Before. Select currency position.
- Field 14 - Default value: Monday. Select search first weekday.
- Field 15 - Default value: Enabled. Use start/end days or select only one day to filter results.
- Field 16 - Default value: Disabled. Enable hours to use them to filter results.
- Field 17 - Enter only hh:mm and add one per line.
- Field 18 - Default value: Enabled. Use start/end hours or select only one hour to filter results.
- Field 19 - Default value: Disabled. Display hours in AM/PM format. NOTE: Hours definitions still need to be in 24 hours format.
- Field 20 - Default value: Disabled. Enable the option to filter results by the number of items available to book.
- Field 21 - Default value: 1. Set minimum availability value to filter results.
- Field 22 - Default value: 10. Set maximum availability value to filter results.
How to add the search function in a page
To add the search to a page, follow these steps:
- Item 1 - Click on Pages.
- Item 2 - Add a new page.
- Item 3 - Edit the name of the search page.
- Item 4 - Click on the button to show the Pinpoint Booking System options available.
- Item 5 - Select what you want to add (calendar/search widget/search)
- Item 6 - Select the Id of the selection from step 5.
- Item 7 - Select the language you want it displayed.
- Item 8 - Click add
- Item 9 - Publish the page to see the changes in your front-end page.
If you already have a page created you can skip steps 2 and 3.
Alternatively, the search can be added using the shortcode [dopbsp item="search" id="search_id" lang="language_shortcode"], where search_id is the id of the search you previously created and language_shortcode is the shortcode of the language you have enabled and want to use.