Posted By

yuconner on 08/24/06


Tagged

wordpress blogs widgets


Versions (?)

Who likes this?

9 people have marked this snippet as a favorite

yuconner
jbo
webStruck_
Bluewall
Xtraboy
mikoli
fyreflyX
clac
clacwebstudio


Example code wordpress widget


 / Published in: PHP
 

URL: http://automattic.com/code/widgets/plugins/

put "registersidebarwidget(..)" into "function widgets_init()"

  1. function widget_myuniquewidget($args) {
  2.  
  3. extract($args);
  4. ?>
  5. <?php echo $before_widget; ?>
  6. <?php echo $before_title
  7. . 'My Unique Widget'
  8. . $after_title; ?>
  9. Hello, World!
  10. <?php echo $after_widget; ?>
  11. <?php
  12.  
  13. }
  14.  
  15. register_sidebar_widget( 'My Unique Widget', 'widget_myuniquewidget' );

Report this snippet  

You need to login to post a comment.