Your account expired support, please renew to get your support.
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #32610
    AgenciaPMO
    Support Expired

    How do I create new elements in the Rating Criteria List?
    The existing ones can be edited (rename them for another one)?

    #32685

    Please 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

    #32817
    AgenciaPMO
    Support Expired

    I 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.”

    error

    #32849

    Please 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

    #32871
    AgenciaPMO
    Support Expired

    I have put the code and deleted the code indicated in the screenshot and the same error continues
    error

    #32902
    This reply has been marked as private.
Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.