You can call the plugin results and search form as php code as follows.
First of all, you need to include the php file “bookinginc.php” which is inside plugin folder.
<?php
include (PLUGINPATH/PLUGINNAME/bookinginc.php);
?>With a standard installation of the plug-in, the suggested code is the follow:
<?php
include (ABSPATH."wp-content/plugins/HotelsNearYou[Booking.Com]/bookinginc.php");
?>Hotel listing
We offer two different functions:
- Bookingcomhotels_html() – for results in HTML data.
- Bookingcomhotels() – for results in array data.
Both functions have the following parameters:
- 1st argument- List Title.
- 2nd argument – No. of hotels to display (integer value).
- 3rd argument – latitude.
- 4th argument – longitude.
- 5th argument – Radius (in meters).
- 6th argument – Refferal Aid.
- 7th argument – Extraction of data in various mode:
- rand – for random
- asc - for ascending order of distance from given longitude and latitude
- desc – for descending order of distance from given longitude and latitude
- 8th argument – image size to display:
- square60 – for 60×60 image
- max300 – for 300×300 image
- original – for original image
- 9th argument – (this is optional) Target for the link. With this option is possible to decide if the hotel details (in booking.com web site) shall be displayed in the same window or in a new window (using ”_blank” as value will open link in new window, otherwise will open link in the same window).
- 10th argument – (this is optional ) City ids in comma separtaed fashion (for e,g ‘-13457,-23456’). This will limit the hotels to this city ids only.
- 11nd (this is optional) Nofollow. If nofollow is set, this add the rel=”nofollow” link to the destination hotel link.
- 12nd (this is optional) Description length. If is set (integer number), will limit the description lenght to the selected characters.
- 13rd argument – (this is optional) Language code. If there is no WPML or no default language is set in wordpress you can specify here language code to show the result in this language code. This only take in effect when there is no WPML or default language in wordpress.
Examples
<?php
//HTML Data
Bookingcomhotels_html('Hotels',10,'45.434124857','12.3318958282',500,305683,'rand','square60','_blank','nofollow','300');
?><?php
//Hotel array
$hotelarray = Bookingcomhotels('Hotels',10,'45.434124857','12.3318958282',500,305683,'rand','square60');
?> Hotel search
For search form you can call the function BookingcomSearch() that display the search form and accepts the following arguments:
- 1st argument- Search result page. You have to specify the link of the page where search results can be displayed. This page should contain the tag- [hny-booking searchresults] which will be replaced by search results. You can create a new page and put this tag in that page provide url here.
- 2nd argument – Button title. For e.g. “Search”.
- 3rd argument – City ids. You can provide now city ids in comma separated form enclosed list in single quote.
Example
<?php BookingcomSearch('http://www.hotelsnearyou.info/?p=xxxx','Search','-120151,-120152'); ?>
We bought this great plugin for our new web site dedicated to Christmas Markets all around Italy and Europe, www.mercatini-natalizi.it.
In each city presented we have inserted the shortcodes to show some hotels. We can choose the number of the hot...
Payments are processed securely via PayPal. This means that you can use both your PayPal account or your preferred credit card.
Stay directly on Venice's Grand Canal and enjoy an intimate atmosphere and stunning interior design that mixes modern classical decoration with the original 16th-century construction of Palazzo Barbarigo.
Start your day with Hotel Barbarigo's free and very rich breakfast buffet featuring a wide variety of fresh foods and fruits.
After a busy day sightseeing or attending to business, relax in Hotel Barbarigo's peaceful atmosphere with a cocktail and a snack at the stylish bar.
The luxuriously decorated rooms at Palazzo Barbarigo reflect classical or Art-Déco design. You will have views on the Rio San Polo canal or the Grand Canal. Standard in-room amenities include laundry service, which is available at an additional cost, a large LCD TV and free Wi-Fi.
Arrive by boat or gondola at Hotel Palazzo Barbarigo, equipped with a private dock at its main entrance.
Friendly and professional staff will assist you during your stay. Airport transfers can be arranged on request.
Recent Comments