I have been finding out how to create Wordpress plug ins and that i can typically determine the hooks to make use of and store input as options, use admin pages and user pages to gather the input.

I needed to produce a simple wordpress plugin to obtain the latest posts however i can't determine where I am designed to put my register_widget call to ensure that the widget to appear in order to drag it towards the sidebar of my choice. It does not come in the widget page whatsoever.

The issue appears to become that I'm not sure where you can put wordpress_register_widget or maybe I ought to be utilising register_widget ditto for wordpress_register_widget_control. In my opinion the add_action at the end from the code is correct but nothing happens. At some point I attempted signing up the widget underneath the add_action also it just demonstrated the widget towards the top of every page but nonetheless this is not on the drag and drop page.

I place the code in Pastebin because it was taking me forever to code block it http://pastebin.com/Q1nJHPV3

Ultimately Let me possess a wordpress plugin that's widgetized in order to utilize it like a template for other plug ins along with a obvious knowledge of where and when things ought to be registered or actions set.