font library fonts not available in font family dropdown menu in editor

  • Claude says I have to add this filter in order to make the font library fonts available in the drop-down menu:

    add_filter( ‘generateblocks_typography_font_family_list’, function( $fonts ) {
    $fonts[] = [ ‘label’ => ‘Roboto Slab’, ‘value’ => ‘Roboto Slab’ ];
    $fonts[] = [ ‘label’ => ‘Poppins’, ‘value’ => ‘Poppins’ ];
    return $fonts;
    } );

    Is that true?

  • Hi there,

    If you’re still using V1 blocks, then yes, you’ll need that snippet.

    However, with V2 blocks the snippet is no longer required. Any fonts added to the Font Library will automatically appear in the font list.

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.