How to get an array with accommodations data

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • #928735
    Bart de Koning


    I’m creating a custom accommodation booking website with the hotel booking plugin.

    I want to create a custom section below each accommodation page which shows a couple of other accommodations, as in “related accommodations”.

    The section will show card type elements with:
    – the featured image
    – the title
    – the capacity
    – accommodation “published at” date to show a “new” tag
    I also have a custom field with the accommodation location so I’ll need the accommodation ID as well.

    Is it possible to get an array with all the accommodations and their data?

    I tried using the [mphb_rooms] shortcode, but this does not really get me what is want.

    Is there a function to do this?

    Andre Flores

    Hi, Bart!

    You may try using [mphb_search_results] shortcode: it allows multiple parameters to include, e.g. featured image, description, meta type and key etc. You may find the list of all available parameters under Accommodations ->Shortcodes ->[mphb_search_results]

    Best regards,

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