Book and reservation buttons still showing in search page results

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 11 months ago by J. Davis.
Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #969719
    maryam wakili
    Participant

    Book and reservation buttons still showing in search page results after checking Hide reservation forms and buttons in settings.

    [img]https://i.imgur.com/QfAS1bH.png[/img]

    i cleared my cache but its still showing.

    #969975
    Andre Flores
    Moderator

    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,
    Andre

    #970300
    maryam wakili
    Participant

    Thank you πŸ˜€

    #970519
    Andre Flores
    Moderator

    Hi, Maryam!

    You are most welcome! πŸ™‚

    Regards,
    Andre

    #1435175
    Nicole Paton
    Participant

    Hi 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,
    Nicole

    #1435179
    Nicole Paton
    Participant

    If 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');
    #1436926
    J. Davis
    Keymaster

    Hi Nicole,

    Thanks for your feedback and shared experience.

    best regards,
    John Davis

Viewing 7 posts - 1 through 7 (of 7 total)
  • You must be logged in to reply to this topic.