I created a PLUGIN with two WIDGETS. 1st widget goes in the sidebar, but the 2nd widget needs to be displayed in a page post using shortcode [mywidget] How can I make this happen? Basically I need "hello me" to be displayed in the page post using [mywidget] shortcode.
//register widget FUNCTION
add_action('widgets_init', 'ds_register_widgets');
//call register widget FUNCTION
function ds_register_widgets(){
register_widget('ds_bm_info');
register_widget('ds_bm_odds');
}
//widget class
class ds_bm_info extends WP_Widget { }
//widget class
class ds_bm_odds extends WP_Widget {
function widget( $args, $instance ) {
echo "hello me";
}
}