parent = $widget; $this->add_control( 'columns', [ 'label' => esc_html__( 'Columns', 'elementor-pro' ), 'type' => Controls_Manager::SELECT, 'options' => [ '1' => '1', '2' => '2', '3' => '3', '4' => '4', '5' => '5', '6' => '6', ], 'default' => '4', ] ); } public function render() { $this->parent->query_posts(); /** @var \WP_Query $query */ $query = $this->parent->get_query(); if ( ! $query->have_posts() ) { return; } global $woocommerce_loop; $woocommerce_loop['columns'] = (int) $this->get_instance_value( 'columns' ); Module::instance()->add_products_post_class_filter(); echo '