title: How to extend a custom widget in wordpress?
body: <p>I am talking about making a widget which extends a child widget of WP_Widget.</p>
  
  <p>Using this as reference: <a href="https://wordpress.stackexchange.com/questions/101438/how-to-extend-a-wp-widget-twice">https://wordpress.stackexchange.com/questions/101438/how-to-extend-a-wp-widget-twice</a></p>
  
  <p>Example:</p>
  
  <p><strong>My_WidgetBase</strong> extends <strong>WP_Widget</strong></p>
  
  <p><strong>My_Widget</strong> extends <strong>My_WidgetBase</strong></p>
  
  <p>I want to know how to get <strong>My_Widget</strong> to show up with my other widgets (it is not currently). I have gotten <strong>My_WidgetBase</strong> to work.</p>
  
  <p>This is important for my framework. I understand that widget(), update(), and form() must be overridden, but I could not find anything about making a grandchild of WP_Widget anywhere.</p>
  
  <p>Example: </p>
  
  <pre><code>class My_WidgetBase extends WP_Widget {
  
      public function __construct($id = 'my-widget-base', $desc = 'My WidgetBase', $opts = array()) {
          $widget_ops = array();
          parent::__construct( $id, $desc, $widget_ops );
      }
  
      public function widget( $args, $instance ) {
          die('function WP_Widget::widget() must be over-ridden in a sub-class.');
      }
  
  
      public function update( $new_instance, $old_instance ) {
          return $new_instance;
      }
  
  
      public function form( $instance ) {
          echo '&lt;p class="no-options-widget"&gt;' . __('There are no options for this widget.') . '&lt;/p&gt;';
          return 'noform';
      }
  
  }
  
      function RegisterMyWidgets() {
          register_widget('My_WidgetBase');
      }
  
  add_action( 'widgets_init', 'RegisterMyWidgets' );
  </code></pre>