Remove Amenity link

  • This topic has 12 replies, 5 voices, and was last updated 4 months ago by J. Davis.
Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #673668
    Massimo BH
    Participant

    Hello,
    is there a way to remove Amenity links from the front slide and from all the other sections?

    #673689
    Stacy Lind
    Keymaster

    Hi Ben,

    Add the following code to Appearance > Customize > Additional CSS:

    .mphb-attribute-value {
      pointer-events: none;
      cursor: default;
      text-decoration: none;
    }

    This will unlink all the amenities on the website.

    #673702
    Massimo BH
    Participant

    It works perfectly.
    Thanks for the support Stacy!

    #705351
    Luke Knowles
    Participant

    The link is still in the code. Is there a way to remove it from the code where it won’t come back each time the theme updates?

    #706719
    J. Davis
    Keymaster

    Hi Luke,

    If you need to remove link tags you can do that by overriding templates of plugin. For example copy the following file

    \wp-content\plugins\motopress-hotel-booking\templates\loop-room-type\attributes\facilities.php

    and paste to

    \wp-content\themes\your-theme_folder\hotel-booking\loop-room-type\attributes\ (you will need to create 3 last directories inside your theme folder)

    Then open the copied file and edit it to remove link from amenities e.g. replace the line below
    return sprintf( '<a href="%s">%s</a>', esc_url( $facilityLink ), $facility->name );

    with this
    return $facility->name;

    #951662
    Nicolas Stübi (SPMA Sàrl)
    Participant

    Hello,

    Is it possible to also deactivate the hyperlink on images of accommodations?

    And ideally, also the title.

    BR
    Nicolas

    #952933
    J. Davis
    Keymaster

    Hi Nicolas,

    Could you clarify your case more detailed? Do you mean you wish to disable link of the title and gallery that are parts of [mphb_room] shortcode (Accommodation Type block/widget)?
    Examples or screenshots are appreciated.

    best regards,
    John Davis

    #972704
    Jan Turek
    Participant

    Hello, can I contribute to this? I wonder how can I remove the link from Accommodation Title (when I use Single Accommodation Elementor Widget). I want to have the title, but I dont want to be linked to a special page.

    Also in isted Accommodation details the Anemities are written as colour of link – can I change it to have it as for examle View?

    #973185
    Andre Flores
    Moderator

    Hello, Jan!

    You may disable the accommodation type title link by adding the following code under Appearance ->Customize ->Additional CSS:

    .mphb_sc_room-wrapper .mphb-room-type-title, .mphb_sc_rooms-wrapper .mphb-room-type-title, .mphb_sc_search_results-wrapper .mphb-room-type-title {
    	pointer-events: none;
    }

    To change the amenities hover color use the following code:

    .mphb-single-room-type-attributes a:hover, .mphb-loop-room-type-attributes a:hover, .loop-room-short-attributes a:hover {
    	color: #13b0bb;
    }

    Replace #13b0bb with any desired color. You may find all the HEX color codes here.

    Regards,
    Andre

    #1508698
    Levent
    Participant

    Hello,

    How do I need to adjust the code to be able to implement this with the current version of MotoPress? The code of the facilities.php file seems to have changed.

    Many greetings
    Levent

    #1510096
    J. Davis
    Keymaster

    Hi Levent,
    The described solution is for the Hotel Booking plugin at the Villagio theme. Do you also use Villagio and the styles are not helpful?

    #1513486
    Levent
    Participant

    Hey J. (:

    Thank you kindly for your answer. Please excuse my a) late reply and b) carelessness. Really missed that this is related to the Villagiao theme.

    How to remove the links with a custom theme?

    Many greetings,
    Levent

    #1518296
    J. Davis
    Keymaster

    Hi Levent,

    Thanks for your reply. I’ve tested this style and it works

    .mphb-room-type-facilities a{
      pointer-events: none;
      color:inherit !important;
    }
Viewing 13 posts - 1 through 13 (of 13 total)
  • You must be logged in to reply to this topic.