Skip to content

Allways display label and description text above color-picker button #66

@onedrop2000

Description

@onedrop2000

Hi there,
When I use the default WP_Customize_Color_Control Class the labeland descirption are displayed above the color-picker, but when I use the WP_Customize_Color_Control Class the labeland descriptiontext is shown after clicking on the color picker button, so the text is hidden.

See on the picture. The first picker is the WP_Customize_Color_Control, the rest is the WP_Customize_Color_Control Class.
bildschirmfoto 2018-04-17 um 11 52 19

The Code looks like that:

<?php
    // Text Color
    $wp_customize->add_setting( 'nav_text_color', array(
      'default'           => '',
    ) );
    $wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'nav_text_color', array(
      'label'    => esc_html__( 'Custom Style Options', 'onedrop_template' ),
      'description' => esc_html__( 'Text Color', 'onedropTemplate' ),
      'section'  => 'header_menulayout_section',
      'settings' => 'nav_text_color',
      'show_opacity' => true, // Optional.
      'priority' => 10
    ) ) );

    // Background Nav Color
    $wp_customize->add_setting( 'nav_background_color', array(
      'default'           => '',
    ) );
    $wp_customize->add_control( new Customize_Alpha_Color_Control( $wp_customize, 'nav_background_color', array(
      'description' => esc_html__( 'Background Color', 'onedropTemplate' ),
      'section'  => 'header_menulayout_section',
      'settings' => 'nav_background_color',
      'priority' => 10
    ) ) );
?>

Any Ideas? Thanks :))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions