Create two widgets in plugin with WP_Widget
-
I have two different widgets I want to be available when someone installs my plugin. I made one widget with
class MYWIDGET extends WP_Widget { //everything here }
thenfunction widget_MYWIDGET_init() {register_widget('MYWIDGET');} add_action('widgets_init', 'widget_MYWIDGET_init');
I tried duplicating the whole class then doing another register_widget but it isn’t working. Also tried doing another init function and add_action
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Create two widgets in plugin with WP_Widget’ is closed to new replies.