• Resolved juxteby

    (@juxteby)


    Hi. I’m trying to implement de Typography control in my site. When I select a font, the customizer show it correctly in the live preview. However, when I save the changes (Pressing “Publish” button) and get out of the customizer, the font isn’t working. Do I missing something? Thanks.

    Kirki::add_section( 'typography_panel', array(
        'priority'    => 200,
        'title'       => esc_html__( 'Typography', 'thegamer' ),
        'description' => esc_html__( 'Define the typography of your site', 'thegamer' ),
        'default'     => '',
      ) );
    
    Kirki::add_field( 'theme_config_id', [
        'type'        => 'typography',
        'settings'    => 'topbar_typography',
        'label'       => esc_html__( 'Topbar', 'kirki' ),
        'section'     => 'typography_panel',
        'choices' => [
          'fonts' => [
            'google' => [ 'Roboto', 'Open Sans', 'Lato', 'Montserrat', 'Noto Sans' ],
          ],
        ],
        'default'     => [
          'font-family'    => 'Roboto',
          'variant'        => 'regular',
        ],
        'priority'    => 10,
        'transport'   => 'auto',
        'output'      => [
          [
            'element' => 'body',
          ],
        ],
      ] );
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘Fonts are not loading’ is closed to new replies.