Free and Premium WordPress Plugins & Themes Forums WordPress Plugins Hotel Booking It's posible add new field at search engine (for example city)
- This topic has 7 replies, 3 voices, and was last updated 6 years, 1 month ago by J. Davis.
- AuthorPosts
- September 16, 2018 at 10:30 am #719647Jorge Monedero MartinParticipant
it is possible to add a new field to the main search engine (for example city) since although now I have the apartments in the same city it is good that the client sees that it is a concrete city
September 18, 2018 at 1:16 pm #720757J. DavisKeymasterHi Jorge,
Yes, since latest update 3.0.0 it is possible to add new attributes e.g. city/location, etc. and add this to the search form to filter results according to proper attributes. Make sure the license is activated on your site to get this update.
best regards,
JohnSeptember 19, 2018 at 10:40 am #721112Jorge Monedero MartinParticipantThanK John, But I do not know how to do it. For example to put a city that attributes would have to put and if you would have to register before this type and where?
You mean attribute form in the search widget?September 19, 2018 at 2:27 pm #721218Stacy LindKeymasterHi Jorge,
Make sure to update the plugin to version 3.0.0. When it is updated, you will see a new sub-menu tab (Accommodation > Attributes). In this menu click Add New and create a City attribute. Click Publish and then Configure Terms. In the Terms menu add all the possible city variations, e.g. New York, Chicago, Seattle.
Then tick the respective cities in Accommodation > Accommodation Types > open the editor of your accommodation types (the Attributes section on the right). When the cities are assigned to your accommodation types, you can add a relevant advanced search shortcode to any page, for example:
[mphb_availability_search attributes=”city”]
You can read more about this shortcode in Accommodation > Shortcodes.
Such search form will run search by city, too.September 19, 2018 at 5:26 pm #721292Jorge Monedero MartinParticipantThank you Stacy,
I have already managed to add the city attribute. But now what I want is to add this city attribute to the search form in the widget at the top of the main page. The dates to choose, number of guests, children and I would like the city to appear. When I add the widget to the top of the main page that I have to add so that the city also appears in the form as field.
Thank youSeptember 21, 2018 at 3:06 pm #721932J. DavisKeymasterHi Jorge,
If you add search form using widget then you should be able to see Attributes: box in widget settings.
Please type there slug of the attribute you created and save changes. This parameter will appear at search form if it is applied at least for 1 accommodation type.best regards,
JohnSeptember 22, 2018 at 7:30 am #722183Jorge Monedero MartinParticipantThank you very much John.
I’m glad to find a solution to my design problems. Something more difficult, it would be possible to put the attribute in front of the selection of dates in the widget. In other words, it now leaves after selecting dates, number of adults and children. Ideally, this attribute should be front to preselect. Thank youSeptember 28, 2018 at 7:34 am #724501J. DavisKeymasterHello Jorge,
Thank you for your question. You can re-place the attributes selector by overriding templates of plugin. For example the search from can be added either by
- shortcode – \wp-content\plugins\motopress-hotel-booking\templates\shortcodes\search\search-form.php
- widget – \wp-content\plugins\motopress-hotel-booking\templates\widgets\search-availability\search-form.php
Thus you can copy this file to your theme folder\hotel-booking\shortcodes\search\ or (your theme folder\hotel-booking\widgets\search-availability\) and edit it moving snippet of attributes to the beginning of the form.
Best regards,
John - AuthorPosts
- You must be logged in to reply to this topic.