• Resolved silvestroilgatto

    (@silvestroilgatto)


    Hi there,

    Thank you for this awesome plugin.

    I’m using the latest development version of Kirki from GitHub as a library in a theme on localhost using Wamp server on Windows 8.1 and PHP 5.4.12. I’ve been trying a few controls and so far everything works. The only problem I’m having is with Google fonts not displaying in the Customizer preview and not even being saved for display in the regular page view.

    The regular fonts (Serif, Sans-serif, and Monospace) work like a charm, but the Google fonts aren’t loaded at all. Therefore, although by viewing the page source code I can see that the font-family style is being injected in the Customizer preview, this has no effect on the display.

    Could you please offer any suggestions as to where to look for to get this to work? Is there a particular server configuration I need to implement? Could it have something to do with decoding json?

    Thank you so much for your help 🙂

    https://ww.wp.xz.cn/plugins/kirki/

Viewing 8 replies - 1 through 8 (of 8 total)
  • Hey there,

    can you please use the snippet from github’s wiki and test if this remains?
    https://github.com/reduxframework/kirki/wiki/Google-Fonts-Integration
    Please keep in mind in that code example that we’re using the ‘output’ argument in order to assign these values in the body element but these values may become overridden by other theme values.

    Please advise,
    Dimitris

    Thread Starter silvestroilgatto

    (@silvestroilgatto)

    Hey Fovoc,

    Thank you for your reply. The Kirki and the CSS code should be fine because the local fonts (Sans-serif, Serif, and Monospace) are applied correctly in the preview and displayed out of the Customizer. The problem is with the Google fonts only.

    Thanks!

    Hey there,

    can you please pull the latest commit from master branch? I think I just resolved that.

    Please advise,
    Dimitris

    Thread Starter silvestroilgatto

    (@silvestroilgatto)

    Hi Dimitris,

    I pulled the development version but I can’t see any changes on this front. This is the code:

    $fields[] = array(
            'type'        => 'select',
            'setting'     => 'prefix_typeface',
            'label'       => __( 'Typeface', 'textdomain' ),
            'description' => __( 'Please choose a typeface for headings and body copy.', 'textdomain' ),
            'section'     => 'prefix_typography',
            'default'     => 'Lato',
            'priority'    => 10,
            'choices'     => Kirki_Fonts::get_font_choices(),
            'output'      => array(
                array(
                    'element'  => 'body, h1, h2, h3, h4, h5, h6',
                    'property' => 'font-family',
                ),
            ),
            'transport'   => 'postMessage',
            'js_vars'     => array(
                array(
                    'element'  => 'body, h1, h2, h3, h4, h5, h6',
                    'function' => 'css',
                    'property' => 'font-family',
                ),
            ),
        );

    As I said, everything works fine with the local font types.

    One more thing: when I use the development version, the background image in the Background control doesn’t work: it doesn’t get applied and is not visible in the preview either. The Background control in the stable version of the plugin here on the .org repo instead works perfectly. Perhaps I should open another thread for this?

    Cheers!

    @silvestroilgatto hey there!

    I’m currently working on some stuff in the github repository and I just became over-jealous with sanitization which is what caused this issue.

    I’ll take a look at it and I’ll have it fixed ASAP.

    Thread Starter silvestroilgatto

    (@silvestroilgatto)

    I appreciate it, Aristeides!

    Hey there,

    can you follow up Aristeides’ response here
    https://github.com/reduxframework/kirki/issues/238#issuecomment-113805258
    and test if latest commits resolve this?

    Please advise,
    Dimitris

    Thread Starter silvestroilgatto

    (@silvestroilgatto)

    Hello Dimitris,

    The issue is solved! Thank you, you’re awesome 🙂

Viewing 8 replies - 1 through 8 (of 8 total)

The topic ‘Google Fonts’ is closed to new replies.