Home Forums WoodMart support forum Error for ttf

Error for ttf

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #153577

    magbaz
    Participant

    i have the same problem …and all had fix by using the functions.php of the child theme Code :

    add_filter( 'upload_mimes', 'woodmart_upload_mimes', 100, 1 );
        function woodmart_upload_mimes( $mimes ) {
            if ( woodmart_get_opt( 'allow_upload_svg' ) ) {
                $mimes['svg'] = 'image/svg+xml';
                $mimes['svgz'] = 'image/svg+xml';
            }
            $mimes['woff'] = 'application/x-font-woff';
            $mimes['woff2'] = 'application/x-font-woff2';
            $mimes['ttf'] = 'application/x-font-ttf';
            $mimes['eot'] = 'application/vnd.ms-fontobject';
            return $mimes;
        }

    but its give error for ttf i dont know why?

    #153702

    Hello,

    There may be two reasons why you cannot upload the file: security and max-size of file permitted.

    In order to solve the security problem.

    1. Add this line to the wp-config.php file: define( ‘ALLOW_UNFILTERED_UPLOADS’, true );

    2. Upload all files formats

    3. Remove this line from the wp-config.php file

    If you have file size problem, contact your host support to solve this issue.

    Best Regards.

Viewing 2 posts - 1 through 2 (of 2 total)