HomePage › Forums › Themes Support › Triply – Tour Booking WordPress Theme › Rating Criteria List
- This topic has 5 replies, 2 voices, and was last updated 1 week, 2 days ago by
Billy Nguyen.
-
AuthorPosts
-
March 15, 2023 at 6:39 pm #32610
How do I create new elements in the Rating Criteria List?
The existing ones can be edited (rename them for another one)?March 17, 2023 at 1:41 pm #32685Please add this custom code to the file functions.php ( child-theme):
add_filter('babe_init_rating_criteria', 'triply_init_rating_criteria_filter', 10, 1); function triply_init_rating_criteria_filter(rating_criteria_arr){ $rating_criteria_arr['location'] = esc_html__('Location', 'triply'); $rating_criteria_arr['amenities'] = esc_html__('Amenities', 'triply'); $rating_criteria_arr['services'] = esc_html__('Services', 'triply'); $rating_criteria_arr['price'] = esc_html__('Price', 'triply'); $rating_criteria_arr['rooms'] = esc_html__('Rooms', 'triply'); return $rating_criteria_arr; }
Change rating_criteria_arr by your key and name
March 21, 2023 at 7:59 pm #32817I paste the code but it tells me there is an error
Error: “The changes to your PHP code have been reverted due to an error on line 3 of the wp-content/themes/triply-child/functions.php file. Please fix it and try saving again.”
March 22, 2023 at 10:51 am #32849Please add again:
add_filter('babe_init_rating_criteria', 'triply_init_rating_criteria_filter', 10, 1); function triply_init_rating_criteria_filter(rating_criteria_arr){ $rating_criteria_arr['location'] = esc_html__('Location', 'triply'); $rating_criteria_arr['amenities'] = esc_html__('Amenities', 'triply'); $rating_criteria_arr['services'] = esc_html__('Services', 'triply'); $rating_criteria_arr['price'] = esc_html__('Price', 'triply'); $rating_criteria_arr['rooms'] = esc_html__('Rooms', 'triply'); return $rating_criteria_arr; }
and remove this code: https://prnt.sc/ZjxkJMVnc9Qd
March 22, 2023 at 5:43 pm #32871I have put the code and deleted the code indicated in the screenshot and the same error continues
March 23, 2023 at 4:03 pm #32902This reply has been marked as private. -
AuthorPosts
You must be logged in to reply to this topic.