Your account expired support, please renew to get your support.

HomePage Forums Themes Support Triply – Tour Booking WordPress Theme How to change rating criteria name

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #12349
    marjandbk
    Support Expired

    I would like to change rating criteria name. I have tried to add this code to functions.php but its not working:

    add_filter('babe_init_rating_criteria', 'trpiply_babe_init_rating_criteria', 10, 1);
    
    function trpiply_babe_init_rating_criteria($rating_criteria_arr) {
    	$rating_criteria_arr['location'] = esc_html__('Kids friendly', 'triply');
    	$rating_criteria_arr['amenities'] = esc_html__('Friendly staff', 'triply');
        $rating_criteria_arr['services'] = esc_html__('Overall experience', 'triply');
    
        return $rating_criteria_arr;
    }
    #12356

    Hi you,

    Please use this code:

    add_action('after_setup_theme', 'triply_add_custom_code');
    function triply_add_custom_code(){
        add_filter('babe_init_rating_criteria', 'triply_babe_init_rating_criteria', 10, 1);
    
        function triply_babe_init_rating_criteria($rating_criteria_arr) {
            $rating_criteria_arr['location'] = esc_html__('Kids friendly', 'triply');
            $rating_criteria_arr['amenities'] = esc_html__('Friendly staff', 'triply');
            $rating_criteria_arr['services'] = esc_html__('Overall experience', 'triply');
    
            return $rating_criteria_arr;
        }
    }
Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.