attributes order

  • This topic has 7 replies, 4 voices, and was last updated 9 months ago by J. Davis.
Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #1016927
    Maria Sarantinou
    Participant

    Hi, How can I change the attribute list order in the Room page details?

    thanks

    #1017805
    Andre Flores
    Moderator

    Hello, Maria!

    You may try re-ordering attributes via Post Type Order plugin, which allows re-ordering any custom post type items via drag-and-drop feature.

    Regards,
    Andre

    #1017841
    Maria Sarantinou
    Participant

    Hi Andre,

    Sorry, I didn’t mean to re-order the posts, what I would need is to have a different order for the Attributes of the Accommodations details.

    Guests: 8
    Amenities: Bathroom essentials, Beachfront, Bedroom comforts, Free parking, Hair dryer, Heating, Terrace, Wi-Fi
    View: Ocean
    Size: 250m²
    Bed Type: 2 Full beds, 2 Queen beds, 2 Tween beds
    Categories: Maldives
    Bedrooms: 3
    Bathrooms: 2
    Location: Maldives

    thanks for your help

    #1018713
    Andre Flores
    Moderator

    Hello, Maria!

    Thank you for clarification. It is possible to change items order by overriding existing actions and applying higher priority to them in the theme functions.php file. For example, in order to move the “View:” element to the top add the following code:

    remove_action( 'mphb_render_single_room_type_attributes', array( '\MPHB\Views\SingleRoomTypeView','renderView' ), 40 );
    
    add_action( 'mphb_render_single_room_type_attributes', array( '\MPHB\Views\SingleRoomTypeView','renderView' ), 9 );

    You may find the listing of all single accommodation type actions in /wp-content/plugins/motopress-hotel-booking/templates/single-room-type/attributes.php file.

    Regards,
    Andre

    #1018739
    Maria Sarantinou
    Participant

    Hi Andre,

    thank you, really helpful.
    what is the progressive number to assign (eg, 1,2,3,4,5 or 10,20,30)?

    Wouldn’t be easier or the same to change it here?
    * @hooked \MPHB\Views\SingleRoomTypeView::renderTotalCapacity
    – 5
    * @hooked \MPHB\Views\SingleRoomTypeView::renderAdults – 10
    * @hooked \MPHB\Views\SingleRoomTypeView::renderChildren – 20
    * @hooked \MPHB\Views\SingleRoomTypeView::renderFacilities – 30
    * @hooked \MPHB\Views\SingleRoomTypeView::renderView – 40
    * @hooked \MPHB\Views\SingleRoomTypeView::renderSize – 4
    * @hooked \MPHB\Views\SingleRoomTypeView::renderBedType – 60
    * @hooked \MPHB\Views\SingleRoomTypeView::renderCategories – 70
    * @hooked \MPHB\Views\SingleRoomTypeView::renderCustomAttributes – 80

    #1026577
    Andre Flores
    Moderator

    Hello Maria,

    Functions need to be overridden in the child theme functions.php file in order to avoid loosing performed changes after the plugin update.

    Regards,
    Andre

    #1589061
    Davide Tesoro
    Participant

    Hi, I’m organizing some attributes but the definition disappeared:

    [] ROOMS 2

    [] BATHROOMS 1

    Now I’ve customized the attribute logos with code in the CSS
    but I lost the definition of the attribute

    [] 2

    How do I make it visible again?

    #1592792
    J. Davis
    Keymaster

    Hi Davide,
    Could you please provide a link where I can check your attributes and the CSS code you applied?

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