It's posible add new field at search engine (for example city)

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 ago by J. Davis.
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #719647
    Jorge Monedero Martin
    Participant

    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

    #720757
    J. Davis
    Keymaster

    Hi 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,
    John

    #721112
    Jorge Monedero Martin
    Participant

    ThanK 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?

    #721218
    Stacy Lind
    Keymaster

    Hi 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.

    #721292
    Jorge Monedero Martin
    Participant

    Thank 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 you

    #721932
    J. Davis
    Keymaster

    Hi 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,
    John

    #722183
    Jorge Monedero Martin
    Participant

    Thank 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 you

    #724501
    J. Davis
    Keymaster

    Hello 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

Viewing 8 posts - 1 through 8 (of 8 total)
  • You must be logged in to reply to this topic.