M45 The Pleiades

The Pleiades, or Seven Sisters, is an open star cluster containing middle-aged hot B-type stars located in the constellation of Taurus. It is among the nearest star clusters to Earth and is the cluster most obvious to the naked eye in the night sky.

Comments
  1. Andrew
    Andrew

    Thanks for tutorial! I never attempted to write a plugin before for a fear it would be too complicated.. Now I shall try! :)

  2. otenyano
    otenyano

    The plugin works. But I can only use the widget one time. How to make it usable on more sidebars?

    1. Tim Trott
      Tim Trott

      This article refers to old versions of WordPress. For an up to date guide for the most recent versions (2.8+) please see this article – http://timtrott.co.uk/creating-widgets-wordpress/

  3. Alok Ranjan Dubey
    Alok Ranjan Dubey

    Thanks,I get a good knowledge about your right instruction.

  4. mahmud
    mahmud

    thanx for informative post. i am a newbie to php and do not follow the array, argument etc functions. Please write a tutorial on how to create a simple widget which i can place anywhere in my theme using div tag. Thanks in advance.

  5. alan
    alan

    Excellent! Thanks for this .. exactly what I was looking for!!

  6. Amitabha Roy
    Amitabha Roy

    The tutorial is small and best. I have learnt widget creation very quickly from here. Thanks.

  7. satish
    satish

    Awesome article.. thanks a lot.

  8. Raul Singh
    Raul Singh

    Thanks Buddy,
    A very well written article. Cheers..keep the good work...

  9. Todd M.
    Todd M.

    Love this. Thank you for the info.

  10. ibnu
    ibnu

    thanks, nice info...

    i just learn create plugin that contain widget....

  11. Udar Gromov
    Udar Gromov

    2012-01-31 TUE 13:40
    First time ever I am leaving a comment!
    Because, this is a pure gold!
    I was able to create my Plug-in in minutes.
    This not only usable, by educational!
    Especially valuable for me was Summary.

    Fantastic! Thank you for your style of presenting!
    As a courtesy to readers, I ran a spell check on my message.

  12. Tim Love
    Tim Love

    This is an excellent article. As someone who has no programming skills, but loads of ideas for wordpress plugins; which is the best place for me to go to be able to hire someone with suitable skills to be able to do the programming for me?

  13. Shaile
    Shaile

    Hi ,

    Thanks to help us.
    It's great and very easy way to make a wedget thanks a lot....:)

  14. Wingman
    Wingman

    Thank you very much for the post! Simple and clear! Just great!

  15. relisys
    relisys

    Tim Trott you are absolutely awesome! I have been trying to get this solution for 4 days straight and no one on irc or anywhere else could help me.

    Many thanks !!!!! Thank you Thank you Thank you.!!

  16. SAMsan
    SAMsan

    Awesomeness !

  17. Steven Ferrino
    Steven Ferrino

    Thanks Tim, this just saved me a bunch of time.

  18. DavidM
    DavidM

    Thank you much. I'm working on a plugin right now using this base and hopefully will get it released very soon.

  19. Cairns Diver
    Cairns Diver

    Thanks for the tutorial, I was trying to find a way to convert mt plugin into a widget for the sidebar.

  20. Chad Huntley
    Chad Huntley

    Thanks for this tutorial, it was very helpful in developing a new widget for BuddyPress!

  21. IWM - Marketing Internet
    IWM - Marketing Internet

    Tim, with your help I created my first widget ever!

    Thanks a lot man

  22. Deep C
    Deep C

    Simple and Superb !!
    Thanks.

  23. DesignMango
    DesignMango

    Nice tutorial thanks

  24. Orion
    Orion

    I've followed the tutorial here, & while the widget appears in the plugins list (which I've activated), my activated plugin doesn't show in the Appearance->Widgets list.

    Might you know why?

    - O8

  25. Towfiq I.
    Towfiq I.

    simple and awesome. Thank you so much for this post :D

  26. Prasath
    Prasath

    Thank You very much!!!

  27. Leyton Jay
    Leyton Jay

    This is shockingly awesome.
    Can't believe it was so easy, I would've started doing this years ago if I'd known!

    Cheers mate.

  28. purwa
    purwa

    wow great! ,this was exactly the solution I was looking for. Thanks alot!

  29. Jeff
    Jeff

    Thank you very much for taking the time to create and share this. With the release of WP 3.0 I'm stepping more into the programing side of WP as I create a custom post type. This is a perfect tutorial for getting me started with Widgets as I wanted a way to display custom post type output in a widget. Thanks!

  30. Dhinakran
    Dhinakran

    Nice and smart for the plugin creators

  31. Y.Y.W.
    Y.Y.W.

    Great tutorial! Thanks for taking the time and post this article. I have bookmarked this post so I can always come back for reference.

    Thanks!

  32. MySelf_v1
    MySelf_v1

    Is it possible to use JavaScript for the Widget?

  33. cathy2005
    cathy2005

    Is it possible to add a widget programmatically so that the user does not have to Drag/Drop?

  34. Clover
    Clover

    GEATE ! ! ! !

    Getting this helpful suggestion, I could alive my PHP code as widgets.

    Thank you!!!!

  35. droid free apps
    droid free apps

    sweet, I have to create my own widget some a site am working on..

  36. mona
    mona

    thank.It help me to make my plugin..

  37. Dan
    Dan

    Really impressive - very simple but very helpfull. Thanks!

  38. djole
    djole

    Very useful article. I am ready to create my personal plugin.
    Thank you.

  39. Glenn
    Glenn

    Tim,

    Nice tutorial. After doing this over and over again I created to tool to take the tedium out of creating WordPress Widgets. Take a look over at http://www.widgetifyr.com and let me know what you think.

    Glenn

  40. Conrad
    Conrad

    Really appreciate this tutorial. Nicely done - simple, quick and to the point. Nicely done.

  41. Angelika
    Angelika

    This was EXACTLY what I needed. Thank you.

  42. Neeraj Kumar
    Neeraj Kumar

    This is a very good example. Since I come from a C++ background, it helped e a lot.

    Thanks again!

  43. Pinyo
    Pinyo

    Really excellent tutorial. I appreciate it! Definitely cut my development time in half.

  44. Christher Lenander
    Christher Lenander

    Thank you. This is what I been looking for. lots of articles about creating plugins but few about creating widgets.

  45. Kaitora
    Kaitora

    Your plugin has been a great help for me to learn how to create some wordpress plugins. All of the other tutorials I have seen have not included anything on widgets. Thanks for the wonderful resource

  46. jim smith
    jim smith

    Thanks for the hello world style example.
    it was the best example i have found yet.

  47. KreCi
    KreCi

    Thanks man! That is so helpful! You will see my new widget plugin released soon!
    Happy New year 2010! :)

  48. BrandonSch
    BrandonSch

    Great post , You've really hit the
    nail on the head, I just don't understand why people quite get it.
    I'm not for sure how many people I've talked to concerning this very
    thing in the past month, and they just can't get it.

    , Excellent post!

  49. Mauricio Wolff
    Mauricio Wolff

    Man... a lifesaver.

    Thanks a lot. This tutorial and the plugin "TS Custom Widgets" (that allows me to select wich widget should show on each page/post) makes wordpress even better.

    Tks a lot

  50. Pravin
    Pravin

    @Uppfinnarn, @Stubbornella: The tags aren't mixed up. They are intented that way.

    Instead of using echo $before_title . 'My Widget Title' . $after_title;

    the author should have used
    echo $before_title;?>My Widget Title<?php echo $after_title;

    1. MasterCJ
      MasterCJ

      Derp, they do the same thing genius. Take a look at the generally used wordpress code conventions sometime and you'll see that the way he did it was far from uncommon.

    2. Pravin
      Pravin

      Oops, the two code lines should be switched.

  51. Markus Freise
    Markus Freise

    Great tutorial to learn first steps. Thank you.

  52. Uppfinnarn
    Uppfinnarn

    There are <strong> tags in some of the latter examples; looks weird...

  53. Gopinath
    Gopinath

    Thank for your widget creation step by step explaination,its really awesome,,.

  54. manitra
    manitra

    Hello,

    Thanks for this tutorial, it's an excellent starting point.

    Manitra.

  55. chocobee
    chocobee

    thanks for the tutorial. do u know any link that teach how to create advance widget?

  56. Stubbornella
    Stubbornella

    There are a couple of places where the tag got mixed in with your php.

  57. jigar
    jigar

    really verry nice article for beginners and its working fine.... thanks ...

  58. Vinicius
    Vinicius

    Greate tuto....

    Tks

  59. Christian
    Christian

    Great article/tutorial

    How about writing about how to make options/settings for a widget. Thar would really be helpful...

  60. kelik
    kelik

    Thanks..

  61. Aod
    Aod

    I'm trying to create a sidebar widget using the code at http://www.stopie6.com/widgets.html (Simple Text Message), but can't work out which code to change in your example, and where to put the code in from the link? How would the php file handle that if statement?

    1. Glenn
      Glenn

      Aod,

      You might want to try my tool over at widgetifyr.com. It wraps code into a WordPress widget.

  62. Njualem
    Njualem

    Excellent and Cristal-Clear, I can now get into making widgets for my website.

    Thanks a Million.

  63. Dimitar Stoyanov
    Dimitar Stoyanov

    Great article! Really good introduction to widget basics.

    software_developer: thank for the nice link. Really helpful information about widget's setup!

  64. seo free
    seo free

    Thanks really helpful to create a plugin for wordpress..thanks lot..:)

  65. James
    James

    I just created a Google Translate widget for my blog and it only took a few minutes thanks to your introduction. Thanks!

  66. Aakash
    Aakash

    Thanks very much. This is the thing i want !

  67. Jonathan Drain
    Jonathan Drain

    Great article! I found it very straightforward and helpful.

  68. Ian Kree
    Ian Kree

    Nice article. It tells exactly what I need to do.

  69. Abi
    Abi

    What a simple solution to my problem. I do not know php but is right away going to try this simple methid to make extra widgets for my blog.
    Thanks!

  70. gercek
    gercek

    better than wordpress documentation. thanks.

  71. Davis
    Davis

    I dont get any of the mubble jummble! please help me in a simple way!!!

  72. Phoenix
    Phoenix

    Hello sir, i have a question. How can i create a title field for the widget so the user can rename it with whatever they like. I really blind about php and Wordpress coding. So could you tell me the code and where to place it. Don't worry i can figure it out. Thanks:).

  73. Björn
    Björn

    Thanx a lot for this nice tutorial ... !!!

    Merry Christmas from Germany...

  74. Jeff R.
    Jeff R.

    I am a little confused by this line;

    &lt?php echo $after_title;

    Is that supposed to be an actual less than bracket, making an opening php tag?

    And, I thought when I started reading this that the Hello World example was just to show you the initial step. What is the purpose of it being called later in the function? I thought for an instant maybe we were supposed to put HTML in there, but you have the widget tags to use what the user theme has already...

    Confused....

    1. Tim Trott
      Tim Trott

      You are correct about the php tag, it got converted to html chars along the way :(

      Not sure quite what you mean about calling the function? I guess your referring to the call to sampleHelloWorld() from within widget_myHelloWorld($args)? This is just to keep the different sections code separate. You can replace sampleHelloWorld() with whatever you wish.

      HTH

  75. My Puppy654
    My Puppy654

    uhhh..... i don't get it! It looks to complicated! I thought it would be easy but i guess not..... i was planning on making a widget but now i guess not.... :(

  76. Rana
    Rana

    Very nice article. Thanks

  77. stratosg
    stratosg

    excellent man! very very very helpful thanks!

  78. nkuttler
    nkuttler

    Great article, thanks! I've already written plugins but never before a widget. This and your post about how to create control panels for widgets are very useful.

  79. Awshaal
    Awshaal

    Thank you so much, such wonderful article.. A++++

  80. Really Nice guide to aadd widgets

  81. chat
    chat

    thanks for all..

  82. Fareeha
    Fareeha

    Thanks a bunch for the help.

  83. palPalani
    palPalani

    thanks for you information, this is what i&squot;m looking for... great!

  84. McLarty
    McLarty

    Thanks for the great &quot;hello-world&quot; ...I&squot;m just getting started on a plugin!

    got any good links to the next steps? Eg. Calling a flash movie or creating options inside of WordPress for the plug-in?

  85. don
    don

    Thx!! A nice and easy to follow explanation!

Leave a Reply

Your email address will not be published.