WordPress.org

Ready to get started?Download WordPress

Forums

WordPress Font Uploader
[resolved] Fonts not uploading and showing in the dropdown menu (Font Uploader) (13 posts)

  1. georgebernard7
    Member
    Posted 1 year ago #

    Hello, I just recently installed this plug-in with an avada theme and when I upload a font, it says it was successful but when I click the drop down menu to choose it, there was nothing even the Vani.ttf does not show.

    Please help. Thank you.

    http://wordpress.org/extend/plugins/font-uploader/

  2. mahnie
    Member
    Posted 1 year ago #

    I have the same exact problem :(

  3. Can you please check the file permissions on the server? Open wp-content/uploads/fonts in an FTP program and tell me what the permissions are set to.

  4. mahnie
    Member
    Posted 1 year ago #

  5. Can you try changing it to 777? 755 is normally what you want, but sometimes it needs less restrictive permissions.

  6. georgebernard7
    Member
    Posted 1 year ago #

    I've changed the permissions on the file and set it to 77 but I still can choose the font but the font is in the uploads folder.

    Thanks.

  7. If you look in FTP, do the files show up in wp-content/uploads/fonts/?

  8. georgebernard7
    Member
    Posted 1 year ago #

    sorry about the typo in the last post above I just realized it wasn't clear, yes the files show up on wp-content/uploads/fonts/ also, I have changed the permissions to 777. Still, it wouldn't let me choose the font even when it says that the font has been successfully uploaded.

  9. I know what causes this.

    Are you able to make a tweak to one of the plugin files if I show you how?

  10. georgebernard7
    Member
    Posted 1 year ago #

    Yes, I think I can, any help will do, thank you!

  11. Open includes/functions.php and change this

    function fu_is_font( $file, $path ) {
    	if ( !in_array( fu_get_file_extension( $file, $path ), fu_get_allowed_font_types() ) )
    		return false;
    
    	$mime = fu_get_file_mime( $file, $path );
    	$extension = fu_get_file_extension( $file, $path );
    	$allowed_mimes = fu_allowed_mime_types();
    
    	if( $allowed_mimes[$extension] != $mime )
    		return false;
    
    	return true;
    }

    to this

    function fu_is_font( $file, $path ) {
            return true;
    	if ( !in_array( fu_get_file_extension( $file, $path ), fu_get_allowed_font_types() ) )
    		return false;
    
    	$mime = fu_get_file_mime( $file, $path );
    	$extension = fu_get_file_extension( $file, $path );
    	$allowed_mimes = fu_allowed_mime_types();
    
    	if( $allowed_mimes[$extension] != $mime )
    		return false;
    
    	return true;
    }
  12. georgebernard7
    Member
    Posted 1 year ago #

    Thanks mate! it finally worked! :)

  13. Excellent!

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic