Adding Classes to individual “mphb-room-type” wrapper

Free and Premium WordPress Plugins & Themes Forums WordPress Plugins Hotel Booking Adding Classes to individual “mphb-room-type” wrapper

  • This topic has 2 replies, 2 voices, and was last updated 3 weeks ago by J. Davis.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #1592508
    Scott Kasprick
    Participant

    I would like to add new classes to all individual room types output by the [mphb_rooms] shortcode to take advantages of classes already available in my Foundation CSS framework.

    Right now the out is:

    <div class=”mphb_sc_rooms-wrapper mphb-room-types “> <– wrapper for all rooms output by shortcode
    <div class=”mphb-room-type post-311 mphb_room_type type-mphb_room_type status-publish has-post-thumbnail mphb_room_type_category-eight-guests mphb_room_type_category-three-beds mphb_room_type_category-two-bedrooms mphb-room-type-adults-1 mphb-room-type-children-0 “> <— I want to add classes to this wrapper

    Example of desired result in bold:

    <div class=”mphb_sc_rooms-wrapper mphb-room-types “>
    <div class=”large-4 columns mphb-room-type post-311 mphb_room_type type-mphb_room_type status-publish has-post-thumbnail mphb_room_type_category-eight-guests mphb_room_type_category-three-beds mphb_room_type_category-two-bedrooms mphb-room-type-adults-1 mphb-room-type-children-0 “>

    Would this be added using hooks? Is there a way to copy templates from the plugin to the themefolder like Woocommerce templates and manually edit them there?

    FYI I am not using blocks and disable Gutenberg.

    Thanks!
    Scott

    #1592509
    Scott Kasprick
    Participant

    I would like to add new classes to all individual room types output by the [mphb_rooms] shortcode to take advantages of classes already available in my Foundation CSS framework.

    Right now the out is:

    <div class=”mphb_sc_rooms-wrapper mphb-room-types “> <– wrapper for all rooms output by shortcode
    <div class=”mphb-room-type post-311 mphb_room_type type-mphb_room_type status-publish has-post-thumbnail mphb_room_type_category-eight-guests mphb_room_type_category-three-beds mphb_room_type_category-two-bedrooms mphb-room-type-adults-1 mphb-room-type-children-0 “> <— I want to add classes to this wrapper

    Example of desired result in bold:

    <div class=”mphb_sc_rooms-wrapper mphb-room-types “>
    <div class=”large-4 columns mphb-room-type post-311 mphb_room_type type-mphb_room_type status-publish has-post-thumbnail mphb_room_type_category-eight-guests mphb_room_type_category-three-beds mphb_room_type_category-two-bedrooms mphb-room-type-adults-1 mphb-room-type-children-0 “>

    Would this be added using hooks? Is there a way to copy templates from the plugin to the theme folder like Woocommerce templates and manually edit them there?

    FYI I am not using blocks and disable Gutenberg.

    Thanks!
    Scott

    #1594991
    J. Davis
    Keymaster

    Hi Scott,

    You can override the files from /motopress-hotel-booking/templates folder. You need to move the files to wp-content/themes/theme-folder/hotel-booking/ directory to override them.
    For example, you can edit this div by copying the following file

    /wp-content/plugins/motopress-hotel-booking/templates/shortcodes/rooms/room-content.php

    to

    /wp-content/themes/theme-folder/hotel-booking/shortcodes/rooms/room-content.php

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