Coding Widgets is very simple. I already showed how to Widgetize third party plugin by simply inserting code into functions.php file. Here I decided to present an example of Adsense Widget coding. This time the Widget will be standalone.
Below is full Adsense Widget code. All you need to do is to put inside Adsense code.
// Google Adsense Code Goes Here
Copy and save this code into php file and put it in widgets folder (you can place it into plugins folder as well). Put inside adsense code and you get adsense widget.
If you are using more than one adsense on your sidebar, then just make copy of this widget and change name to something like: Adsense_BlaBla. Do not forget to change all functions names, so that Widget functions are unique.
I wrote an AdSense widget yesterday too. Only I didn’t want to tie it down to specific AdSense code, so like the text widget, mine is configurable. You can add up to 4 AdSense widget entries and paste the AdSense code Google gives you into the config screen for each one.
Check it out here: http://ottodestruct.com/blog/2006/04/09/fun-with-widgets/
Nice work!
Thank you for providing good information,Wholesale Electronics and Wholesale Gadgets from pickegg.com,Pickegg.com is an online Wholesale Electronics store. Offers consumer electronics and electronic gadgets at best price
I would like to win because although I have heard good reviews about benefit products, I have not tried any of the products. With love
, Sandrine from Republic.