0

I have created an Elementor custom widget to enhance the functionality, but I am facing an issue. After setting up all the widgets I am not able to set the default fonts for my widgets. For reference, you can check the below code.

In the below code, I just wanted to set the default font family, font size, font weight, and so on. But I am not finding any solution to set the default value.

Code I am using

$this->add_group_control(
            \Elementor\Group_Control_Typography::get_type(),
            [
                'name' => 'dte_typ',
                'label' => __( 'Date', 'plugin-domain' ),
                'scheme' => Elementor\Core\Schemes\Typography::TYPOGRAPHY_1,
                'selector' => '{{WRAPPER}} .sp-our-story-data-container .sp-our-story-details .sp-our-story-date',
            ]
        );

Tried this code but it is not working

$this->add_group_control(
            \Elementor\Group_Control_Typography::get_type(),
            [
                'name' => 'dte_typ',
                'label' => __( 'Date', 'plugin-domain' ),
                'scheme' => Elementor\Core\Schemes\Typography::TYPOGRAPHY_1,
                'default' => [
                    'Family' => 'Aleo',
                ],
                'selector' => '{{WRAPPER}} .sp-our-story-data-container .sp-our-story-details .sp-our-story-date',
            ]
        );
micheal65536
  • 558
  • 3
  • 6
  • 26

0 Answers0