Free and Premium WordPress Plugins & Themes Forums WordPress Plugins Hotel Booking How to change the number of months in calendar at single property page
- This topic has 1 reply, 2 voices, and was last updated 1 year, 11 months ago by Jochen Held.
Viewing 2 posts - 1 through 2 (of 2 total)
- AuthorPosts
- May 28, 2020 at 7:07 am #959766J. DavisKeymaster
Hi,
In order to change the number of months in the availability calendar on the page of the accommodation type you may add the following code to functions.php file:
//remove the default calendar remove_action( 'mphb_render_single_room_type_metas', array( '\MPHB\Views\SingleRoomTypeView', 'renderCalendar' ), 40 ); //register a new custom function to add shortcode where you can change the number of the months add_action( 'mphb_render_single_room_type_metas', 'my_theme_custom_calendar', 40 ); function my_theme_custom_calendar(){ echo do_shortcode('[mphb_availability_calendar monthstoshow="1,3"]'); }
It is recommended to add the code to functions.php file of the child theme to keep the changes in case the parent theme is updated.
Best regards,
J. DavisDecember 13, 2022 at 1:35 am #1389694Jochen HeldParticipantThanks it works! 🙂 And it looks, that i asked the same question nearly 1 year ago. I found a changed functions.php-file in my directories. the right file has been overwritten by me last days… sorry and thank you for the help!!!
- AuthorPosts
Viewing 2 posts - 1 through 2 (of 2 total)
- You must be logged in to reply to this topic.