Adaptive Blog Theme: Custom Widgets
videos

Adaptive Blog Theme: Custom Widgets

This entry is part 8 of 12 in the Adaptive Blog Theme: From Photoshop to WordPress Session
« PreviousNext »

One way of adding functionality to a WordPress theme is through widgets. WordPress has a selection of useful widgets built-in, but you may want to make some custom widgets to suit your theme.


Custom Widgets Part 1



Alternatively, Download the video, or subscribe to Wptuts+ screencasts via YouTube

Custom Widgets Part 2



Alternatively, Download the video, or subscribe to Wptuts+ screencasts via YouTube

Resources

Note: Want to add some source code? Type <pre><code> before it and </code></pre> after it. Find out more
  • http://twitter.com/bicho44 Federico Reinoso

    Adi, its posible to display the same data of a widget y two different widget areas?

    • Adi Purdila
      Author

      @twitter-20804320:disqus As far as I know you cannot because once you create a new widget it basically creates another instance of that class, so even tho the content is the same between the two widgets… it’s still another different content… if that makes any sense.

      I could be mistaken of course, I still have lots to learn in WP :D So, if anybody has a different answer on this… please chime in :)

  • http://twitter.com/megane999 Almaz

    It’s possible to create some news widget that displays different content for each page or post?

  • http://www.facebook.com/al.mcrorie Al McRorie

    have coded up these videos, finding that the input boxes on the widget are not showing, input box titles show up but not the boxes to input the data when I create the Ad widget.

    what have I coded incorrectly??

    Al

    p.s. another question, could you not use the Text widget to show your ad image? I know this is a tutorial on WordPress but interested in the answer to the question.

    • http://www.facebook.com/al.mcrorie Al McRorie

      further to this, I copied and set up the Foo Widget code from the codex Widgets_API page and that is working. so still searching for an answer to why the Adaptive coded widget does not work properly

      • http://www.facebook.com/al.mcrorie Al McRorie

        wow, stupid typing error, it is input not imput

        now the code is working as it should

        Al

        • http://www.facebook.com/al.mcrorie Al McRorie

          on my IE8 system, the 260 px image is too large for the sidebar, the sidebar is only 220 px wide, so I suppose you really should not put a specific size image in there

  • http://twitter.com/BurakSahin59 Burak Şahin 

    Thanks buddy :) I will do it :)

  • Richard

    Hey Adi, will you make some videos on how to create custom post types & custom meta boxes? Thanks

  • http://twitter.com/BurakSahin59 Burak Şahin 

    Hey Adi, I made it but İt doesnt work :/ What will I do?
    there is nothing :/
    http://pastebin.mozilla.org/2072236 this is my code, Help me please :(

    • http://www.facebook.com/al.mcrorie Al McRorie

      it is public function form not from

      Al

      • http://twitter.com/BurakSahin59 Burak Şahin 

        Ohhh Really Thank you :)

  • krim belkacem

    thank you adi purdila
    continue doing this!

  • http://www.facebook.com/lee.wright.75286100 Lee Wright

    More
    keyboard short-cuts! Use them all the time and love them.

  • Kim Bryant

    This is a great tutorial–and just in time for me, too!

    Could you share the source code with us? I’d like to use this as a basis for modification for my own theme, but I’m currently working in a single-monitor setup, so it’s a bit difficult to transcribe the code.

  • Gabriele

    Hi Adi, first of all thank you for this fantastic tutorial!

    I’ve got an issue with the widgets and i don’t how to fix it.

    When i try to add a widget to my sidebar, the widget is closed automatically and i can’t see the content of it.

    The only way for see the content of the widget is click save.

    This appen also with the default widgets!

    I’ve try to remove the custom widget that you have created, but this issue is stil working!

    What could be appened?

    Sorry for my english, i hope you can understand me.

    • http://www.facebook.com/pubudu.malalasekara Pubudu Ranjan Malalasekara

      same issue here… You found the solution?

      • http://www.facebook.com/GbrlBllcc Gabriele Bellucci

        No i don’t have find the solution. But i think that the problem is in a plugin.