Take Control of Your Wordpress Widgets

502 views

Published on

Kaspars Dambis held this presentation at WorCamp Norway 2013. Kaspar Dambis is a Latvian working at Metronet in Oslo. He is the creator of the popular Widget Context plugin. He blogs about WordPress at konstruktors.com and be found on Twitter at @konstruktors.

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total views
502
On SlideShare
0
From Embeds
0
Number of Embeds
2
Actions
Shares
0
Downloads
5
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Take Control of Your Wordpress Widgets

  1. 1. Take Control of Your Widgets Kaspars Dambis konstruktors.com @konstruktors WordCamp Norway 2013
  2. 2. Who is this guy?
  3. 3. Latvian Champion in Autocross, 2007
  4. 4. Worlds first electric race carto finish Dakar rally in 2012
  5. 5. In ❤ since 2007
  6. 6. Custom Function Widgets
  7. 7. Custom Function Widgets
  8. 8. Widget ContextVersion 0.1
  9. 9. A Sidebar?
  10. 10. Sidebar "Minima" for Blogger
  11. 11. Sidebar "Cubric" in WordPress 1.5 (2005)
  12. 12. Sidebar "Twenty Twelve" in WordPress (2012)
  13. 13. Sidebars arefor related content
  14. 14. Widgets in Core Widgets were first provided by a plugin. Available in core since WP 2.2 (May 16, 2007).
  15. 15. Widgets in Core Available in core since WP 2.2 (May 16, 2007).
  16. 16. Problems1. Widgets are not attached to the content 2. Widgets cant be edited in context BUT Widgets provide flexibility
  17. 17. But Context Matters
  18. 18. Solutions1. Use multiple widget areas (sidebars) and templates to control their appearance 2. Use a plugin
  19. 19. Solutions1. Use multiple widget areas (sidebars) and templates to control their appearance 2. Use a plugin
  20. 20. Widget Logic Need to know Template Tags (cant give to clients) Uses evil() eval();
  21. 21. WooSidebarsSidebars as a custom post type. Sidebars in context.
  22. 22. WooSidebars Creates a lot of widget areas with custom visibility rules which are defined in another section of the WordPress dashboard.
  23. 23. Display WidgetsAdds context UI to widget settings.
  24. 24. Widget ContextAdds context UI to widget settings. Individual posts and pages can be targeted only by URL patterns, which are hard to understand.
  25. 25. Problems1. Widgets cant be edited on per-page basis. 2. Widgets cant be re-ordered on per-page basis
  26. 26. Widget Context Experiments
  27. 27. Concept ABring Widget UI into Page Edit Screen
  28. 28. Concept A Features: Per-page settings; Re-order widgets. Problems: Adding and hiding new widgets requires editing all pages
  29. 29. Concept A Demo
  30. 30. Concept BSimple Show/Hideoption with a list ofavailable rules.
  31. 31. Concept B Demo
  32. 32. Concept C
  33. 33. Concept C Demo
  34. 34. Conclusions1. Current setup (Sidebar UI) doesnt allow granular widget control.2. Granular setup (Post Edit UI) is hard to manage on large scale sites.
  35. 35. konstruktors.com @konstruktorsgithub.com/kasparsd

×