Support » Plugin: Elementor Page Builder » How to fetch widget settings value

  • I’m trying to fetch widget settings value so I can use it in my theme code. The problem is Elementor stores all the widget settings in DB except default values. In my code I have default: 3, but in database this value is not exist unless I save some other number. How can I fetch default value?

    $this->add_control(
                'post_items',
                [
                    'type'        => \Elementor\Controls_Manager::NUMBER,
                    'label'       => '<i class="fa fa-th-large"></i> ' . __( 'Posts', 'deo-elementor' ),
                    'placeholder' => __( 'How many posts?', 'deo-elementor' ),
                    'default'     => 3,
                ]
            );
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘How to fetch widget settings value’ is closed to new replies.