Take new php file then copy the below code to file and put the file in plugins folder and activate the plugin
Now you can see the widget in widgetarea of wordpress named 'My First Widget'
/* Plugin Name: Simple Widget */
function widget_myuniquewidget() {
echo "This is simple widget";
}
register_sidebar_widget('My First Widget','widget_myuniquewidget');
No comments:
Post a Comment