Free and Premium WordPress Plugins & Themes Forums WordPress Plugins Hotel Booking attributes order
- This topic has 7 replies, 4 voices, and was last updated 7 months, 4 weeks ago by J. Davis.
- AuthorPosts
- October 14, 2020 at 10:28 am #1016927Maria SarantinouParticipant
Hi, How can I change the attribute list order in the Room page details?
thanks
October 16, 2020 at 7:16 am #1017805Andre FloresModeratorHello, 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,
AndreOctober 16, 2020 at 9:14 am #1017841Maria SarantinouParticipantHi 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: Maldivesthanks for your help
October 19, 2020 at 8:00 am #1018713Andre FloresModeratorHello, 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,
AndreOctober 19, 2020 at 8:56 am #1018739Maria SarantinouParticipantHi 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 – 80November 6, 2020 at 4:03 pm #1026577Andre FloresModeratorHello 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,
AndreMarch 17, 2024 at 5:17 pm #1589061Davide TesoroParticipantHi, 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?
March 24, 2024 at 3:08 pm #1592792J. DavisKeymasterHi Davide,
Could you please provide a link where I can check your attributes and the CSS code you applied? - AuthorPosts
- You must be logged in to reply to this topic.