Free and Premium WordPress Plugins & Themes Forums WordPress Plugins Hotel Booking Not able to delete default information on accomodation type pages
- This topic has 17 replies, 4 voices, and was last updated 3 years, 7 months ago by Andre Flores.
- AuthorPosts
- January 7, 2021 at 5:36 pm #1056398Jindřich DlabajaParticipant
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.
January 8, 2021 at 10:18 am #1056594Andre FloresModeratorHello 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,
AndreJanuary 8, 2021 at 1:01 pm #1056679Jindřich DlabajaParticipantHello 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
JindrichJanuary 12, 2021 at 7:21 am #1057956Andre FloresModeratorHello 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,
AndreJanuary 20, 2021 at 7:01 am #1061971M PParticipantHi Andre,
thanks for this hint. There is nothing written about the functions.php in the relevant help article: Motopress SupportI 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 );
January 21, 2021 at 12:33 am #1062380Andre FloresModeratorHello 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,
AndreJanuary 25, 2021 at 7:59 am #1064317RobertParticipantYep – 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?
January 25, 2021 at 11:58 pm #1064735Andre FloresModeratorHello 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,
AndreJanuary 26, 2021 at 2:28 am #1064792RobertParticipantSure 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,
RobJanuary 26, 2021 at 9:14 am #1065018RobertParticipantHi 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,
RobFebruary 20, 2021 at 1:34 am #1077686RobertParticipantHi Andre,
As in the above, is there any way to stop the gallery linking to the accommodation type page?
Cheers,
RobFebruary 22, 2021 at 1:53 am #1078160Andre FloresModeratorHello 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,
AndreFebruary 22, 2021 at 2:35 am #1078178RobertParticipantThank you Andre – the CSS worked perfectly!
February 24, 2021 at 12:19 am #1079557Andre FloresModeratorHello 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,
AndreApril 20, 2021 at 10:54 pm #1109134RobertParticipantHi 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 - AuthorPosts
- You must be logged in to reply to this topic.