Extending Widgets – Exclude # of posts field from Recent Posts Widget
You need to add a ‘form’ method. That is the method that creates the widget form on the backend. In the current default widget, that method looks like this: function form( $instance ) { $title = isset( $instance[‘title’] ) ? esc_attr( $instance[‘title’] ) : ”; $number = isset( $instance[‘number’] ) ? absint( $instance[‘number’] ) : … Read more