Support Forum ยป User Profile

Forum Replies Created

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • in reply to: add Logo as admin toolbar item #31915
    SashSash
    Participant

    Hi, Long

    Thx for your answer. Would you be so nice and give me an code example of how I do it with the init hook or the get_option version ...

    I'm still a little inexperienced with it... this would help me a lot.

    Thx a lot.

    Cheers,
    Sash

    in reply to: add Logo as admin toolbar item #31906
    SashSash
    Participant

    Hi, Long

    Thx for your answer. Would you be so nice and give me an conde example of how I do it with the init hook or the get_option version ...

    I'm still a little inexperienced with it... this would help me a lot.

    Thx a lot.

    Cheers,
    Sash

    in reply to: add Logo as admin toolbar item #31899
    SashSash
    Participant

    Like this
    Link to Image

    in reply to: Metabox settings page / color picker / css variables / Oxygen #30756
    SashSash
    Participant

    Some Friends send me the code... The Problem is more, that Metabox works in a other way. Im new in the metabox community und buyed the Dev licence couple days ago. My Questions to you was, how we can do this with Metabox. Thx

    add_action( 'wp_enqueue_scripts', 'custom_css' );
    /**
     * Set custom CSS variables using values from ACF options page.
     */
    function custom_css() {
    
        $primary_color = get_field( 'primary_color', 'option' );
        $secondary_color = get_field( 'secondary_color', 'option' );
        $light_gray = get_field( 'light_gray', 'option' );
        $main_dark = get_field( 'main_dark', 'option' );
        
        $custom_css = "
            :root {
                --primary-color: {$primary_color};
                --secondary-color: {$secondary_color};
                --light-gray: {$light_gray};
                --main-dark: {$main_dark};
            }";
    
        wp_add_inline_style( 'oxygen', $custom_css );
    
    }
Viewing 4 posts - 1 through 4 (of 4 total)