Shortcode booking form
[booking-form]
[booking-form location=5122]
Code language: JSON / JSON with Comments (json)
**If you work with locations, then there is no main location anymore for the restaurant reservations plugin. So if you have a main and sub location, then you can only allow reservations for the sub location. If you also need reservations for the main location, then you need to create a sub location for that as well.**
Check confirm by default
If you edit the reservation to change the status to confirmed, it
doesn’t send a confirmation unless you check the ‘Send notifications‘
box. Copy the below function in the child themes functions.php to
have that box checkedby default.
// 5* restaurant reservations, edit reservations send message box
checked by default
function rtb_switch_admin_notification_field_callback( $fields,
$request ) {
$fields['admin']['fields']['notifications']['request_input']
= true;
return $fields;
}
add_filter( 'rtb_booking_form_fields',
'rtb_switch_admin_notification_field_callback', 21, 2 );
Code language: PHP (php)
Style the reservation form
/* -- START Scroll to Top icon background color-- */
.et_pb_scroll_top {
background-color: #d5ae35 !important;
color: #ffffff !important;
border: 1px solid #cdbad6 !important;
}
/** -- START Restaurant Reservations Plugin --**/
/* -- use these variables to set the colors -- */
:root{
--hws-accent-color: #404a04;
--hws-border-color: #a7b287;
--hws-background-color: #ffffff;
--hws-input-text-color: #404a04;
--hws-button-text-color: #ffffff;
}
header#main-header {
z-index: 9998;
}
.picker__frame {
z-index: 99999;
}
fieldset.contact, fieldset.reservation {
float: left;
width: 47%;
}
fieldset.reservation {
margin-right:50px;
}
.rtb-text.email, .rtb-text.phone {
display: inline-block;
width: 48.1%;
}
.rtb-text.email {
margin-right: 10px;
}
.rtb-booking-form input, .rtb-booking-form .message textarea {
max-width: 100%!important;
border: 1px solid var(--hws-border-color);
border-radius: 3px !important;
background-color: var(--hws-background-color);
}
.rtb-booking-form input, select#rtb-party {
padding: 12px;
font-size: 1rem;
border: 1px solid var(--hws-border-color);
border-radius: 3px !important;
background-color: var(--hws-background-color);
}
select {
border-radius: 3px !important;
}
select#rtb-party {
height: 3rem;
line-height: 40px;
width: 100%;
border: 1px solid var(--hws-border-color);
border-radius: 3px !important;
outline: 0;
outline-offset: -1px;
background-color: var(--hws-background-color);
}
.rtb-booking-form legend {
padding: 0!important;
font-size: 22px;
color: var(--hws-input-text-color);
}
.rtb-booking-form fieldset {
margin-bottom: 2em!important;
}
.add-message a {
display: inline!important;
}
.rtb-textarea {
position: relative;
top: auto;
left: auto;
}
.rtb-booking-form .rtb-error {
background: #C10C0C!important;
}
.rtb-booking-form button {
display: block !important;
font-family: inherit;
font-size: 24px;
letter-spacing: 0px;
text-align: center!important;
background: var(--hws-border-color);
color: var(--hws-button-text-color) !important;
border: 1px solid var(--hws-border-color);
border-radius: 3px !important;
height: 58px !important;
width: 100% !important;
padding: .3em 1em !important;
transition: all 0.4s ease-in-out;
margin-top: 25px;
bottom: 0;
}
.rtb-booking-form button:hover {
color: var(--hws-accent-color);
border: 1px solid var(--hws-accent-color);
border-radius: 3px !important;
background: var(--hws-accent-color) !important;
letter-spacing: 0px;
}
.picker__list-item {
padding: .5em 0;
font-size: 15px;
display: inline-block;
width: 24.8%;
text-align: center;
border-bottom: 0px!important;
}
.picker--time .picker__frame, .picker--opened .picker__frame {
max-width: 50%!important;
top: 25%!important;
}
.picker__day {
font-weight: 300 !important;
}
.picker__day--highlighted {
border-color: #fff!important;
}
.picker__button--today:before {
border-top-color: var(--hws-accent-color) !important;
}
.picker__day--today:before {
border-top-color: #fff!important;
}
.picker--focused .picker__list-item--disabled,
.picker__list-item--disabled, .picker__list-item--disabled:hover
{
display: none;
}
.picker__day--highlighted:hover, .picker__day--infocus:hover,
.picker__day--outfocus:hover, .picker__list-item:hover {
background: #fff!important;
box-shadow: inset 0px 0px 0px 3px var(--hws-accent-color);
border: 0!important;
}
.picker__button--clear:hover, .picker__button--close:hover,
.picker__button--today:hover, .picker__nav--next:hover,
.picker__nav--prev:hover {
background: #ddd!important;
box-shadow: inset 0px 0px 0px 3px #ddd;
}
.picker__day--selected,
.picker__day.picker__day--infocus.picker__day--today:hover,
.picker--focused .picker__day--highlighted,
.picker__day.picker__day--infocus.picker__day--selected.picker__day--highlighted:hover,
.picker__list-item--highlighted,
li.picker__list-item.picker__list-item--selected.picker__list-item--highlighted.picker__list-item--viewset:hover,
li.picker__list-item.picker__list-item--highlighted.picker__list-item--viewset:hover
{
background: var(--hws-accent-color) !important;
color: #fff!important;
border: 1px solid var(--hws-accent-color);
}
.rtb-booking-form input, .rtb-booking-form textarea, .rtb-booking-form
select {
border: 1px solid var(--hws-border-color) !important;
color: var(--hws-input-text-color) !important;
font-weight: bold !important;
}
.rtb-booking-form input:focus, .rtb-booking-form textarea:focus,
.rtb-booking-form select:focus {
border: 1px solid var(--hws-accent-color) !important;
color: var(--hws-input-text-color) !important;
font-weight: bold !important;
}
.rtb-message {
text-align: -webkit-center;
text-align: center;
}
@media only screen and (min-width: 782px) and (max-width: 1392px) {
fieldset.contact, fieldset.reservation {
width: 46%;
}
}
@media only screen and (max-width: 782px) {
fieldset.contact, fieldset.reservation {
width: 100%;
}
}
/** -- END Restaurant Reservations Plugin --**/
Code language: CSS (css)
Bulk delete all old reservations
Use this plugin
- <https://en-gb.wordpress.org/plugins/bulk-delete/>
- Delete by post type
- Booking (rtb-booking)