Not able to delete default information on accomodation type pages

Free and Premium WordPress Plugins & Themes Forums WordPress Plugins Hotel Booking Not able to delete default information on accomodation type pages

Viewing 15 posts - 1 through 15 (of 18 total)
  • Author
    Posts
  • #1056398
    Jindřich Dlabaja
    Participant

    Hi, I’m using Hotel Booking plugin with Divi theme (with the integration installed). I have no problems with creating my own layouts with the blocks made for Divi BUT for unknown reasons I’m not able to delete the information generated automatically by the Hotel Booking plugin.

    Everything I add on the back-end (property name, gallery, featured image) automatically spawns on the front-end of the single accommodation type page. It uses some of the preset stylings from Divi (buttons and fonts) but it spans over the whole width of the viewport (though the site is set to 1100 px). With the Divi builder on, it cannot be deleted and not even clicked on and I can’t figure out how to get rid of it.

    Can someone help with the issue, please? Thanks.

    #1056594
    Andre Flores
    Moderator

    Hello Jindřich,

    I assume you are referring to default meta blocks displayed on single accommodation type pages. If so, you may remove them by overriding Hotel Booking actions in your theme functions.php file, e.g.:

    remove_action( 'mphb_render_single_room_type_metas', array( '\MPHB\Views\SingleRoomTypeView',
     'renderGallery' ), 10 );

    The above code will remove the default gallery generated automatically by the plugin, simply add the code to your active theme functions.php file (it is recommended to use the child theme).
    You will find a list of all actions for meta blocks in this article.

    Regards,
    Andre

    #1056679
    Jindřich Dlabaja
    Participant

    Hello Andre,

    Thanks for your response. I’ve stumbled upon the article before but ignored it when I’ve seen Elementor in the title. It works fine but it’s not a very elegant solution. Does Motopress consider adding a setting that allows users to use blank accommodation templates without changing the code (maybe as part of the Divi/Elementor integration?

    Thanks again
    Jindrich

    #1057956
    Andre Flores
    Moderator

    Hello Jindřich,

    I am glad that you were able to have it working. Yes, we do have such a feature request and I have added your up-vote to it as well. In case there are more similar requests from other users, we will consider adding this option to one of the plugin future updates. Anybody else who also needs this feature feel free to let us know by commenting this thread.

    Regards,
    Andre

    #1061971
    M P
    Participant

    Hi Andre,
    thanks for this hint. There is nothing written about the functions.php in the relevant help article: Motopress Support

    I added the following line to my child themes functions.php to delete all elements from the single room page (website.com/accommodation/room-x/) but there are no changes at all. What can I do?

    remove_action( 'mphb_render_single_room_type_metas', array( '\MPHB\Views\SingleRoomTypeView',
     'renderGallery' ), 10 );
    
    remove_action( 'mphb_render_single_room_type_metas', array( '\MPHB\Views\SingleRoomTypeView',
     'renderAttributes' ), 20 );
    
    remove_action( 'mphb_render_single_room_type_metas', array( '\MPHB\Views\SingleRoomTypeView',
     'renderDefaultOrForDatesPrice' ), 30 );
    
    remove_action( 'mphb_render_single_room_type_metas', array( '\MPHB\Views\SingleRoomTypeView', 'renderCalendar' ), 40 );
    
    remove_action( 'mphb_render_single_room_type_metas', array( '\MPHB\Views\SingleRoomTypeView',
     'renderReservationForm' ), 50 );
    
    #1062380
    Andre Flores
    Moderator

    Hello there,

    Kindly submit a request to our Help Desk providing temporary access to WordPress dashboard, so we take a closer look at the issue.

    Regards,
    Andre

    #1064317
    Robert
    Participant

    Yep – I would up-vote this too as it would be nice to be able to easily edit these pages.

    In fact, I would actually like it if you could turn off the Accommodation type page as the other pages I have created do what I need them to do. Is there a way to stop the gallery linking to the Accommodation type page?

    #1064735
    Andre Flores
    Moderator

    Hello Robert,

    Thank you for your up-vote, it has been counted. Kindly provide me with the example page URL, where you need to stop the gallery from being linked to the accommodation type page.

    Regards,
    Andre

    #1064792
    Robert
    Participant

    Sure Andre. Here is the link:

    https://woldswineestate.com/luxury-vineyard-glamping-pods

    The main image of the gallery always links to the accommodation type page. I have tried to find a setting to disable this but haven’t had any luck.

    Thanks for your help,
    Rob

    #1065018
    Robert
    Participant

    Hi Andre,
    If you look at above page I’ve also noticed that the price under the gallery does not update for the accommodation it is referring to. All properties say “prices start at £150 per night” but this is not true for two of the properties. Is the price supposed to be accommodation specific or is it the starting price for all the accommodations?

    Cheers,
    Rob

    #1077686
    Robert
    Participant

    Hi Andre,

    As in the above, is there any way to stop the gallery linking to the accommodation type page?

    Cheers,
    Rob

    #1078160
    Andre Flores
    Moderator

    Hello Rob,

    You may prevent the main image from being linked to the accommodation type page by adding the following code under Appearance ->Customize ->Additional CSS:

    #mphb-flexslider-gallery-1 a img {
    	pointer-events: none;
    }

    As for the “prices start at” section the base price of the current season is usually displayed, I can see it currently says “Prices start at: £200 for 2 nights”.

    Regards,
    Andre

    #1078178
    Robert
    Participant

    Thank you Andre – the CSS worked perfectly!

    #1079557
    Andre Flores
    Moderator

    Hello Robert,

    You are most welcome, I am glad I could help 🙂
    It would be very much appreciated if you leave your positive feedback about the Hotel Booking plugin at: https://motopress.com/products/hotel-booking/#edd-reviews-respond.

    Thank you in advance!

    Regards,
    Andre

    #1109134
    Robert
    Participant

    Hi Andre,

    I used the custom CSS code you provided above to prevent the main image from being linked to the accommodation type page, however, it only works on the first gallery. I have four accommodations on a single page each with their own gallery. The gallery at the top of the page doesn’t link to the accommodation type page after that CSS is enabled. However, the accommodations below all still link through. Is there a way to stop these too?

    Page: https://woldswineestate.com/nottingham-glamping-pods

    Cheers,
    Rob

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