display posts on elementor widget

I am trying to display posts in a Elementor widget.selection section of Post type seems on settings but there is no content or else command on page.What is my mistake?

use \Elementor\Controls_Manager;   //paste    /**  * Get All POst Types  * @return array  */     class Elementor_oEmbed_Widget extends \Elementor\Widget_Base {  //paste      public function eael_get_all_types_post()     {         $  posts = get_posts([             'post_type' => 'any',             'post_style' => 'all_types',             'post_status' => 'publish',             'posts_per_page' => '-1',         ]);          if (!empty($  posts)) {             return wp_list_pluck($  posts, 'post_title', 'ID');         }          return [];     }     $  this->add_control(     'post_type',     [         'label' => __('Source', 'plugin-name'),         'type' => Controls_Manager::SELECT,         'options' => get_post_types(['public' => true, 'show_in_nav_menus' => true], 'objects'),            // 'default' => key($  this->post_types),     ] );  $  this->add_control(     'posts_ids',     [         'label' => __('Search & Select', 'plugin-name'),         'type' => Controls_Manager::SELECT2,         //'options' => $  this->eael_get_all_types_post(),         'label_block' => true,         'multiple' => true,         'condition' => [             'post_type' => 'by_id',         ],     ] );    protected function __render_template($  args, $  settings)     {          $  settings = $  this->get_settings_for_display();          $  html = wp_oembed_get($  settings['url']);          echo '<div class="oembed-elementor-widget">';          echo ($  html) ? $  html : $  settings['url'];          echo '</div>';            //paste            $  query = new \WP_Query($  args);         if($  query->have_posts()) {             while ($  query->have_posts()) {                 $  query->the_post();                 get_the_author_meta("display_name");             }          }         else         {echo "<div style=background:red> lsdkjf </div>";}