How the widget can be run by shortcode

I have my own widget, that uses WP_Widget class, and executes its code inside function in this class.
Is there any ways to run this widget using shortcode inside post?

This is how my widget structure looks like:

Read More
add_action( 'widgets_init', 'register_my_widget' );
function register_my_widget() {}
class My_Widget extends WP_Widget () {
    function My_Widget() {}
    function widget() {}
    function update() {}
    function form() {}
}

How can I add the shortcode for executing this widget?

Related posts

Leave a Reply

1 comment