Divi Child > need icons in front of Amenities and new line for each

Free and Premium WordPress Plugins & Themes Forums WordPress Plugins Hotel Booking Divi Child > need icons in front of Amenities and new line for each

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • #894194
    Patiphong Phoojiravivat
    Participant

    Hi

    I’m using Divi Child Theme and poor in css.

    First tiem with Metropess \and need some help.

    THe amenities are like this

    Amenities

    I want to have 2 modification in Amenities :
    1. New line for each one
    2. A small icons (Font Awesome) in front of eacch amenity.

    Please advice which file I have to modify and add anything.

    Thanks & Best Regards

    #894211
    Patiphong Phoojiravivat
    Participant

    Sorry, Image is missing

    Thankks & Best Regards

    #896585
    Steve
    Keymaster

    Hello Patiphong Phoojiravivat,

    This is not so simple but you can use my answer as a starting point.

    1. To make each amenity on a new line use this CSS code:

    .mphb-room-type-facilities .mphb-attribute-value > span {
        display: inline-block;
        width: 100%;
    }

    2. To remove a comma override this filter
    apply_filters( 'mphb_room_type_facilities_delimiter', ', ' );

    3. To add an icon you should add CSS based on the amenity name. For example you have a “Free WiFi” amenity. In this case css-class for this amenity will be facility-free-wi-fi. The CSS code to add an icon for this amenity will be:

    .facility-free-wi-fi > a::before {
        content: '';
        font-family: 'fontawesome';
        margin-right: 0.5em;
    }
    #896684
    Patiphong Phoojiravivat
    Participant

    Thanks so much! It’s working now for

    https://simathani.testyourwebs.com/accommodations

    Anyway, for each accommodation it’s doesn’t work.

    https://simathani.testyourwebs.com/accommodation/premier-suite-room/

    Please help me to fix it too.

    #898052
    Patiphong Phoojiravivat
    Participant

    Please void this post. I got it. Put in each Accommodation Types.
    Thanks

    #1456817
    vldnd
    Participant

    Hello,

    Can anyone advise how this rule can be applied now?
    On the current version of WP and Booklium, the comma is not removed.

    2. To remove a comma override this filter
    apply_filters( 'mphb_room_type_facilities_delimiter', ', ' );

    #1460937
    J. Davis
    Keymaster

    Hi,

    You may add the code below to the functions.php file of the theme or by using the Code Snippets plugin:

    function theme_mphb_room_type_facilities_delimiter(){
     return ' new separator here ';
     }
    add_filter('mphb_room_type_facilities_delimiter','theme_mphb_room_type_facilities_delimiter');

    Add any custom separator instead text new separator here

    best regards,
    John Davis

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