[Support request] Global fonts – functions.php

Home Forums Support [Support request] Global fonts – functions.php

Home Forums Support Global fonts – functions.php

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #2237066
    Alfiniti

    I’m using this code:

    /* Changes the Global Colros in GP */
    add_filter( ‘option_generate_settings’, function( $settings ) {
    $settings[‘global_colors’] = [
    [
    ‘name’ => __( ‘Contrast’, ‘generatepress’ ),
    ‘slug’ => ‘contrast’,
    ‘color’ => ‘#000000’,
    ],
    [
    ‘name’ => sprintf( __( ‘Base’, ‘generatepress’ ), ‘2’ ),
    ‘slug’ => ‘base’,
    ‘color’ => ‘#ffffff’,
    ],

    // And so on..
    ];

    return $settings;
    } );

    In the past, I had no problem with this but, today I can’t get my global colors to take.

    Do you have any idea what bone-head mistake I’m making?

    #2237069
    David
    Staff
    Customer Support

    Hi there,

    if you’re using the latest version of the theme, then that code won’t work and is not required, as you can set your own Global Colors directly in the Customizer > Colors now

    #2237070
    Alfiniti

    ohhhhhhhhhhhhhhhhhhhhhhhhhh!

    Thanks!

    #2237638
    David
    Staff
    Customer Support
Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.