Free and Premium WordPress Plugins & Themes Forums WordPress Plugins Hotel Booking How to get an array with accommodations data
- This topic has 1 reply, 2 voices, and was last updated 6 years ago by
Andre Flores.
- AuthorPosts
- March 11, 2020 at 8:57 am #928735
Bart de Koning
ParticipantHi,
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?
March 17, 2020 at 3:17 pm #931488Andre Flores
ModeratorHi, 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,
Andre - AuthorPosts
- You must be logged in to reply to this topic.