{"id":206,"date":"2023-09-14T12:23:58","date_gmt":"2023-09-14T12:23:58","guid":{"rendered":"https:\/\/doc.freevision.me\/luxed\/?p=206"},"modified":"2023-09-14T12:23:58","modified_gmt":"2023-09-14T12:23:58","slug":"shortcodes","status":"publish","type":"post","link":"https:\/\/doc.freevision.me\/luxed\/shortcodes\/","title":{"rendered":"Shortcodes"},"content":{"rendered":"\n<p>Go to Accommodation \u2192 Shortcodes to get all needed shortcodes to place to the needed pages and output all hotel booking info.<\/p>\n\n\n\n<p>Here are the shortcodes you can use:<\/p>\n\n\n\n<h2>Availability Search Form<\/h2>\n\n\n\n<p><code>[mphb_availability_search]<\/code> \u2013 use this shortcode to display a search form.<\/p>\n\n\n\n<ul>\n<li><code>adults<\/code> \u2013 the number of adults preset in the search form.<br>(values: 1\u202610 \/ default: 1)<\/li>\n\n\n\n<li><code>children<\/code> \u2013 the number of children preset in the search form<br>(values: 0\u202610 \/ default: 0)<\/li>\n\n\n\n<li><code>check_in_date<\/code> \u2013 check-in date preset in the search form.<br>(values: date in format d\/m\/Y \/ default: empty string)<\/li>\n\n\n\n<li><code>check_out_date<\/code> check-out date preset in the search form<br>(values: date in format d\/m\/Y \/ default: empty string)<\/li>\n\n\n\n<li><code>attributes<\/code> custom attributes for advanced search<br>(values: comma-separated slugs of attributes \/ default: empty string)<\/li>\n\n\n\n<li><code>class<\/code> \u2013 custom CSS class for shortcode wrapper<br>(values: whitespace separated css classes \/ default: empty string)<\/li>\n<\/ul>\n\n\n\n<p>Example:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">[mphb_availability_search adults=\"2\" children=\"1\" check_in_date=\"25\/06\/2018\" check_out_date=\"30\/06\/2018\" attributes=\"city,price-range\"]<\/pre>\n\n\n\n<h2>Availability Calendar<\/h2>\n\n\n\n<p><code>[mphb_availability_calendar]<\/code> \u2013 use this shortcode to show the individual availability calendar of a particular accommodation type.<\/p>\n\n\n\n<ul>\n<li><code>id<\/code> \u2013 indicate the ID of a certain accommodation type whose availability calendar you want to show.<br>(values: integer number, this parameter is Required)<\/li>\n\n\n\n<li><code>monthstoshow<\/code> \u2013 how many months to show<br>(values: set the number of columns or the number of rows and columns separated by comma, example: \u201c3\u201d or \u201c2,3\u201d \/ default: 2)<\/li>\n\n\n\n<li><code>class<\/code> \u2013 custom CSS class for shortcode wrapper<br>(values: whitespace separated css classes \/ default: empty string)<\/li>\n<\/ul>\n\n\n\n<p>Example:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">[mphb_availability_calendar id=\"123\" monthstoshow=\"2,3\"]<\/pre>\n\n\n\n<p>Note: you can find ID of Accommodation Type at URL while editing it \u2013 in the address bar of your browser e.g. https:\/\/your-site.com\/wp-admin\/post.php?post=777&amp;action=edit<\/p>\n\n\n\n<h2>Availability Search Results<\/h2>\n\n\n\n<p><code>[mphb_search_results]<\/code> \u2013 use this shortcode to show search results listing according to user\u2019s search criteria.<\/p>\n\n\n\n<ul>\n<li><code>title<\/code> \u2013 whether to display title of the accommodation type<br>(values: true, yes,1, on | false, no,0,off \/ default: true)<\/li>\n\n\n\n<li><code>featured_image<\/code> \u2013 whether to display featured image of the accommodation type<br>(values: true | false (yes,1,on | no,0,off \/ default: true)<\/li>\n\n\n\n<li><code>gallery<\/code> \u2013 whether to display gallery of the accommodation type<br>(values: true | false (yes,1,on | no,0,off \/ default: true)<\/li>\n\n\n\n<li><code>excerpt<\/code> \u2013 whether to display excerpt (short description) of the accommodation type<br>(values: true, yes,1, on | false, no,0,off \/ default: true)<\/li>\n\n\n\n<li><code>details<\/code> \u2013 whether to display details of the accommodation type<br>(values: true, yes,1, on | false, no,0,off \/ default: true)<\/li>\n\n\n\n<li><code>price<\/code> \u2013 whether to display price of the accommodation type<br>(values: true, yes,1, on | false, no,0,off \/ default: true)<\/li>\n\n\n\n<li><code>view_button<\/code> \u2013 whether to display \u2018View Details\u2019 button with the link to accommodation type<br>(values: true, yes,1, on | false, no,0,off \/ default: true)<\/li>\n\n\n\n<li><code>orderby<\/code> \u2013 sort by<br>(values: price, order, ID, title, date, menu_order. See the <a href=\"https:\/\/developer.wordpress.org\/reference\/classes\/wp_query\/#order-orderby-parameters\">full list<\/a> \/ default: menu_order)<\/li>\n\n\n\n<li><code>order<\/code> \u2013 designates the ascending or descending order of sorting. ASC \u2013 from lowest to highest values (1, 2, 3). DESC \u2013 from highest to lowest values (3, 2, 1)<br>(values: ASC, DESC \/ default: DESC)<\/li>\n\n\n\n<li><code>meta_key<\/code> \u2013 custom field name. Required if \u201corderby\u201d is one of the \u201cmeta_value\u201d, \u201cmeta_value_num\u201d or \u201cmeta_value_*\u201d<br>(values: custom field name \/ default: empty string)<\/li>\n\n\n\n<li><code>meta_type<\/code> \u2013 specified type of the custom field. Can be used in conjunction with orderby=\u201dmeta_value\u201d<br>(values: NUMERIC, CHAR, DATETIME. See the <a href=\"https:\/\/developer.wordpress.org\/reference\/classes\/wp_query\/#order-orderby-parameters\">full list<\/a> \/ default: empty string)<\/li>\n\n\n\n<li><code>class<\/code> \u2013 custom CSS class for shortcode wrapper<br>(values: whitespace separated css classes \/ default: empty string)<\/li>\n<\/ul>\n\n\n\n<p>Example:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">[mphb_search_results title=\"true\" featured_image=\"true\" gallery=\"false\" excerpt=\"false\" details=\"true\" price=\"true\" view_button=\"false\" default_sorting=\"price\"]<\/pre>\n\n\n\n<h2>Accommodation Types Listing<\/h2>\n\n\n\n<p><code>[mphb_rooms]<\/code> \u2013 listing of available room types.<\/p>\n\n\n\n<ul>\n<li><code>title<\/code> \u2013 whether to display title of the accommodation type<br>(values: true, yes,1, on | false, no,0,off \/ default: true)<\/li>\n\n\n\n<li><code>featured_image<\/code> \u2013 whether to display featured image of the accommodation type<br>(values: true | false (yes,1,on | no,0,off \/ default: true)<\/li>\n\n\n\n<li><code>gallery<\/code> \u2013 whether to display gallery of the accommodation type<br>(values: true | false (yes,1,on | no,0,off \/ default: true)<\/li>\n\n\n\n<li><code>excerpt<\/code> \u2013 whether to display excerpt (short description) of the accommodation type<br>(values: true, yes,1, on | false, no,0,off \/ default: true)<\/li>\n\n\n\n<li><code>details<\/code> \u2013 whether to display details of the accommodation type<br>(values: true, yes,1, on | false, no,0,off \/ default: true)<\/li>\n\n\n\n<li><code>price<\/code> \u2013 whether to display price of the accommodation type<br>(values: true, yes,1, on | false, no,0,off \/ default: true)<\/li>\n\n\n\n<li><code>view_button<\/code> \u2013 whether to display \u2018View Details\u2019 button with the link to accommodation type<br>(values: true, yes,1, on | false, no,0,off \/ default: true)<\/li>\n\n\n\n<li><code>book_button<\/code> \u2013 whether to display Book button<br>(values: true, yes,1, on | false, no,0,off \/ default: true)<\/li>\n\n\n\n<li><code>posts_per_page<\/code> \u2013 amount of accommodations to show per page of pagination<br>(values: number \/default: empty string) e.g. posts_per_page=\u201d6\u201d<\/li>\n\n\n\n<li><code>class<\/code> \u2013 custom CSS class for shortcode wrapper<br>(values: whitespace separated css classes \/ default: empty string)<\/li>\n\n\n\n<li><code>category<\/code> \u2013 indicate IDs of categories you want to list accommodations from<br>(values: Comma-separated IDs. \/ default: empty string)<\/li>\n\n\n\n<li><code>tags<\/code> \u2013 indicate IDs of tags you want to list accommodations by<br>(values: Comma-separated IDs. \/ default: empty string)<\/li>\n\n\n\n<li><code>ids<\/code> \u2013 indicate IDs of certain accommodation types that you want to list<br>(values: Comma-separated IDs. \/ default: empty string)<\/li>\n\n\n\n<li><code>relation<\/code> \u2013 this parameter can be applied for category and tags terms. Its allows you to define whether to meet all or any of the conditions specified in tags and categories.<br>Values: AND \u2013 is used to list accommodations that meet ALL tags and categories values. OR \u2013 is used to list accommodations that meet at least one of tags or categories values (default value: OR)<\/li>\n\n\n\n<li><code>orderby<\/code> \u2013 sort by<br>(values: price, order, ID, title, date, menu_order. See the <a href=\"https:\/\/developer.wordpress.org\/reference\/classes\/wp_query\/#order-orderby-parameters\">full list<\/a>. \/ default: menu_order)<\/li>\n\n\n\n<li><code>order<\/code> \u2013 designates the ascending or descending order of sorting. ASC \u2013 from lowest to highest values (1, 2, 3). DESC \u2013 from highest to lowest values (3, 2, 1)<br>(values: ASC, DESC \/ default: DESC)<\/li>\n\n\n\n<li><code>meta_key<\/code> \u2013 custom field name. Required if \u201corderby\u201d is one of the \u201cmeta_value\u201d, \u201cmeta_value_num\u201d or \u201cmeta_value_*\u201d<br>(values: custom field name \/ default: empty string)<\/li>\n\n\n\n<li><code>meta_type<\/code> \u2013 specified type of the custom field. Can be used in conjunction with orderby=\u201dmeta_value\u201d<br>(values: NUMERIC, CHAR, DATETIME. See the <a href=\"https:\/\/developer.wordpress.org\/reference\/classes\/wp_query\/#order-orderby-parameters\">full list<\/a>. \/ default: empty string)<\/li>\n<\/ul>\n\n\n\n<p>Example:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">[mphb_rooms title=\"true\" featured_image=\"true\" gallery=\"false\" excerpt=\"false\" details=\"true\" price=\"true\" view_button=\"true\" book_button=\"false\" posts_per_page=\"6\" category=\"25,33\" tags=\"112,287\" relation=\"OR\"]<\/pre>\n\n\n\n<p>Note: you can find ID of tag or category at URL while editing it \u2013 in the address bar of your browser e.g. https:\/\/your-site.com\/wp-admin\/term.php?taxonomy=mphb_room_type_tag&amp;tag_ID=50&amp;post_type=\u2026<\/p>\n\n\n\n<h2>Services Listing<\/h2>\n\n\n\n<p><code>[mphb_services]<\/code> this shortcode allows to list all services of your rental establishment.<\/p>\n\n\n\n<ul>\n<li><code>ids<\/code> \u2013 indicate IDs of certain services that you want to list.<br>(values: Comma-separated IDs. \/ default: empty string)<\/li>\n\n\n\n<li><code>posts_per_page<\/code> \u2013 amount of services to show per page of pagination<br>(values: number \/default: empty string) e.g. posts_per_page=\u201d3\u201d<\/li>\n\n\n\n<li><code>orderby<\/code> \u2013 sort by<br>(values: price, order, ID, title, date, menu_order. See the <a href=\"https:\/\/developer.wordpress.org\/reference\/classes\/wp_query\/#order-orderby-parameters\">full list<\/a>. \/ default: menu_order)<\/li>\n\n\n\n<li><code>order<\/code> \u2013 designates the ascending or descending order of sorting. ASC \u2013 from lowest to highest values (1, 2, 3). DESC \u2013 from highest to lowest values (3, 2, 1)<br>(values: ASC, DESC \/ default: DESC)<\/li>\n\n\n\n<li><code>meta_key<\/code> \u2013 custom field name. Required if \u201corderby\u201d is one of the \u201cmeta_value\u201d, \u201cmeta_value_num\u201d or \u201cmeta_value_*\u201d<br>(values: custom field name \/ default: empty string)<\/li>\n\n\n\n<li><code>meta_type<\/code> \u2013 specified type of the custom field. Can be used in conjunction with orderby=\u201dmeta_value\u201d<br>(values: NUMERIC, CHAR, DATETIME. See the <a href=\"https:\/\/developer.wordpress.org\/reference\/classes\/wp_query\/#order-orderby-parameters\">full list<\/a>. \/ default: empty string)<\/li>\n\n\n\n<li><code>class<\/code> \u2013 custom CSS class for shortcode wrapper<br>(values: whitespace separated css classes \/ default: empty string)<\/li>\n<\/ul>\n\n\n\n<p>Example:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">[mphb_services ids=\"138,78,79\" posts_per_page=\"2\"]<\/pre>\n\n\n\n<p>Note: you can find ID of Service at URL while editing it \u2013 in the address bar of your browser e.g. https:\/\/your-site.com\/wp-admin\/post.php?post=138&amp;action=edit<\/p>\n\n\n\n<h2>Single Accommodation Type<\/h2>\n\n\n\n<p><code>[mphb_room]<\/code> \u2013 this shortcode is used to display certain accommodation type.<\/p>\n\n\n\n<ul>\n<li><code>id<\/code> \u2013 indicate ID of certain accommodation type that you want to show.<br>(values: integer number \/ this parameter is Required)<\/li>\n\n\n\n<li><code>title<\/code> \u2013 whether to display title of the accommodation type<br>(values: true, yes,1, on | false, no,0,off \/ default: true)<\/li>\n\n\n\n<li><code>featured_image<\/code> \u2013 whether to display featured image of the accommodation type<br>(values: true | false (yes,1,on | no,0,off \/ default: true)<\/li>\n\n\n\n<li><code>gallery<\/code> \u2013 whether to display gallery of the accommodation type<br>(values: true | false (yes,1,on | no,0,off \/ default: true)<\/li>\n\n\n\n<li><code>excerpt<\/code> \u2013 whether to display excerpt (short description) of the accommodation type<br>(values: true, yes,1, on | false, no,0,off \/ default: true)<\/li>\n\n\n\n<li><code>details<\/code> \u2013 whether to display details of the accommodation type<br>(values: true, yes,1, on | false, no,0,off \/ default: true)<\/li>\n\n\n\n<li><code>price<\/code> \u2013 whether to display price of the accommodation type<br>(values: true, yes,1, on | false, no,0,off \/ default: true)<\/li>\n\n\n\n<li><code>view_button<\/code> \u2013 whether to display \u2018View Details\u2019 button with the link to accommodation type<br>(values: true, yes,1, on | false, no,0,off \/ default: true)<\/li>\n\n\n\n<li><code>book_button<\/code> \u2013 whether to display Book button<br>(values: true, yes,1, on | false, no,0,off \/ default: true)<\/li>\n\n\n\n<li><code>class<\/code> \u2013 custom CSS class for shortcode wrapper<br>(values: whitespace separated css classes \/ default: empty string)<\/li>\n<\/ul>\n\n\n\n<p>Example:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">[mphb_room id=\"777\" title=\"true\" featured_image=\"true\"]<\/pre>\n\n\n\n<p>Note: you can find ID of Accommodation Type at URL while editing it \u2013 in the address bar of your browser e.g. https:\/\/your-site.com\/wp-admin\/post.php?post=777&amp;action=edit<\/p>\n\n\n\n<h2>Checkout Form<\/h2>\n\n\n\n<p><code>[mphb_checkout]<\/code> \u2013 this shortcode shows checkout form while making a reservation.<\/p>\n\n\n\n<p>Note: Use only on page that you set as Checkout Page in Settings<\/p>\n\n\n\n<h2>Accommodation Booking Form<\/h2>\n\n\n\n<p><code>[mphb_availability]<\/code> \u2013 a booking form to check availability of a particular accommodation type.<\/p>\n\n\n\n<ul>\n<li><code>id<\/code> \u2013 indicate ID of certain accommodation type to check availability for<br>(values: integer number \/ default: empty string)<\/li>\n\n\n\n<li><code>class<\/code> \u2013 custom CSS class for shortcode wrapper<br>(values: whitespace separated css classes \/ default: empty string)<\/li>\n<\/ul>\n\n\n\n<p>Example:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">[mphb_availability id=\"777\"]<\/pre>\n\n\n\n<p>Note: you can find ID of Accommodation Type at URL while editing it \u2013 in the address bar of your browser e.g. https:\/\/your-site.com\/wp-admin\/post.php?post=777&amp;action=edit<\/p>\n\n\n\n<h2>Accommodation Rates List<\/h2>\n\n\n\n<p><code>[mphb_rates]<\/code> \u2013 to show all rates for a particular room.<\/p>\n\n\n\n<ul>\n<li><code>id<\/code> \u2013 indicate ID of certain accommodation type to list its available rates<br>(values: integer number \/ default: empty string)<\/li>\n\n\n\n<li><code>class<\/code> \u2013 custom CSS class for shortcode wrapper<br>(values: whitespace separated css classes \/ default: empty string)<\/li>\n<\/ul>\n\n\n\n<p>Example:<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">[mphb_rates id=\"777\"]<\/pre>\n\n\n\n<p>Note: you can find ID of Accommodation Type at URL while editing it \u2013 in the address bar of your browser e.g. https:\/\/your-site.com\/wp-admin\/post.php?post=777&amp;action=edit<\/p>\n\n\n\n<h2>Booking Confirmation<\/h2>\n\n\n\n<p><code>[mphb_booking_confirmation]<\/code> \u2013 this shortcode shows booking and payment details.<\/p>\n\n\n\n<ul>\n<li><code>class<\/code> \u2013 custom CSS class for shortcode wrapper<br>(values: whitespace separated css classes \/ default: empty string)<\/li>\n<\/ul>\n\n\n\n<p>Note: Use this shortcode on Booking Confirmation Page.<\/p>\n\n\n\n<p>You can add the needed shortcode in the following way: go to add new Post, Page or Custom Post Type \u2192 paste your shortcode in the content area \u2192 publish the changes.<\/p>\n\n\n\n<h2>Booking Cancelation<\/h2>\n\n\n\n<p><code>[mphb_booking_cancellation]<\/code> \u2013 this shortcode shows booking cancelation details.<br>Use this shortcode on the Booking Cancelation page.<\/p>\n\n\n\n<h2>Customer Account<\/h2>\n\n\n\n<p><code>[mphb_account]<\/code> \u2013 this shortcode shows log in form or customer account area.<br>Use this shortcode to create the My Account page.<\/p>\n\n\n\n<h2>Customize Hotel Booking styles<\/h2>\n\n\n\n<p>If you want to customize the look (styling) of the property search form, booking forms, widgets and more, you can use extra Hotel Booking classes accessible via the <a href=\"https:\/\/wordpress.org\/plugins\/mphb-styles\/\">Hotel Booking Styles<\/a> addon. It allows you to copy\/paste the needed class to the Hotel Booking shortcodes or Gutenberg blocks in order to make such adjustments as to make the search form horizontal, delete field labels, etc.<\/p>\n\n\n\n<p>For example:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/doc.freevision.me\/luxed\/wp-content\/uploads\/sites\/25\/2023\/09\/hotel-booking-docs-image7.png\" alt=\"image7\"\/><\/figure>\n\n\n\n<p>This form is created thanks to the \u201cis-style-horizontal-form\u201d class:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/doc.freevision.me\/luxed\/wp-content\/uploads\/sites\/25\/2023\/09\/hotel-booking-docs-image13.png\" alt=\"image13\"\/><\/figure>\n","protected":false},"excerpt":{"rendered":"<p>Go to Accommodation \u2192 Shortcodes to get all needed shortcodes to place to the needed pages and output all hotel booking info. Here are the shortcodes you can use: Availability Search Form [mphb_availability_search] \u2013 use this shortcode to display a search form. Example: [mphb_availability_search adults=&#8221;2&#8243; children=&#8221;1&#8243; check_in_date=&#8221;25\/06\/2018&#8243; check_out_date=&#8221;30\/06\/2018&#8243; attributes=&#8221;city,price-range&#8221;] Availability Calendar [mphb_availability_calendar] \u2013 use this [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[19],"tags":[],"_links":{"self":[{"href":"https:\/\/doc.freevision.me\/luxed\/wp-json\/wp\/v2\/posts\/206"}],"collection":[{"href":"https:\/\/doc.freevision.me\/luxed\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/doc.freevision.me\/luxed\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/doc.freevision.me\/luxed\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/doc.freevision.me\/luxed\/wp-json\/wp\/v2\/comments?post=206"}],"version-history":[{"count":1,"href":"https:\/\/doc.freevision.me\/luxed\/wp-json\/wp\/v2\/posts\/206\/revisions"}],"predecessor-version":[{"id":209,"href":"https:\/\/doc.freevision.me\/luxed\/wp-json\/wp\/v2\/posts\/206\/revisions\/209"}],"wp:attachment":[{"href":"https:\/\/doc.freevision.me\/luxed\/wp-json\/wp\/v2\/media?parent=206"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/doc.freevision.me\/luxed\/wp-json\/wp\/v2\/categories?post=206"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/doc.freevision.me\/luxed\/wp-json\/wp\/v2\/tags?post=206"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}