Free and Premium WordPress Plugins & Themes Forums WordPress Themes Booklium Book and reservation buttons still showing in search page results
- This topic has 6 replies, 4 voices, and was last updated 1 year, 8 months ago by J. Davis.
- AuthorPosts
- June 20, 2020 at 8:38 pm #969719maryam wakiliParticipantJune 22, 2020 at 7:35 am #969975Andre FloresModerator
Hello, Maryam!
The “Hide reservation forms and buttons” hides buttons and forms on single accommodation type pages. You may hide them on Search Results page as well by adding the following code under Appearance ->Customize ->Additional CSS:
.button.mphb-button.mphb-recommendation-reserve-button { display: none; } .mphb-reserve-room-section .button.mphb-button.mphb-book-button { display: none; }
Regards,
AndreJune 22, 2020 at 7:21 pm #970300maryam wakiliParticipantThank you 😀
June 23, 2020 at 6:50 am #970519Andre FloresModeratorHi, Maryam!
You are most welcome! 🙂
Regards,
AndreMarch 28, 2023 at 11:19 pm #1435175Nicole PatonParticipantHi there, I’m having this problem too.
Sure I could hide them with css as suggested above however then when I want to open bookings again I also have to go to my theme files and remove the CSS which is a bit of an annoying extra step every time I want to open and close bookings on the site (twice a year as it’s seasonal).
Can this please be fixed so book now buttons are hidden in all locations when the box is checked?
As a suggestion for the future can there please also be an option to hide the availability search forms and replace with the alternative text as well?
Thanks,
NicoleMarch 28, 2023 at 11:36 pm #1435179Nicole PatonParticipantIf anyone is interested I have written a quick little function for this to allow it to be hidden automatically depending on the value of the “Hide reservation forms and buttons” checkbox.
Paste into the theme functions file.
function hide_book_now_buttons() { $mphb_booking_disabled = get_option( 'mphb_booking_disabled' ); if($mphb_booking_disabled == 1){ ?> <style type="text/css"> .button.mphb-button.mphb-recommendation-reserve-button { display: none; } .mphb-reserve-room-section .button.mphb-button.mphb-book-button { display: none; } .mphb-reserve-room-section{ display: none; } </style> <?php } } add_action('wp_head', 'hide_book_now_buttons');
April 2, 2023 at 4:05 am #1436926J. DavisKeymasterHi Nicole,
Thanks for your feedback and shared experience.
best regards,
John Davis - AuthorPosts
- You must be logged in to reply to this topic.