Chapter 6 Widgets

When you’re making changes to your template’s code, as we did in the last chapter, it’s always worth asking yourself if you can implement your change as a new widget area, or as a custom widget. For example, in the last chapter, we saw how to add a list of pages to the site’s footer. Why not just add a new widget area to the site’s footer, and create a custom widget for displaying only top-level pages? That way users could display the list of pages there if they wanted to, but could also choose to display nothing, or to display entirely different content.

In this chapter you’ll learn how to customize your theme by adding widget-ready areas, and how to create your own custom widgets to package with your theme.

Understanding ...

Get Build Your Own Wicked Wordpress Themes now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.