In the previous recipes, I showed you how easy it is to add widgets and widget-ready zones to your theme. As you may know, every new WordPress version comes with some built-in widgets such as page list, categories list, search form, and so on. These widgets are useful for most of our requirements, but sometimes you may need something more specific. For example, you might want to exclude some pages to appear from the list.
In this recipe, I'll show you how you can modify WordPress core widgets without editing any core files.
To execute this recipe, you just need a widget-ready theme and a functions.php
file. Most recent themes feature this file, however, if it doesn't exist, just create it.
I have read lots of WordPress related tutorials all over the Web, where people have posted about editing WordPress core files. In my opinion, this is a really, really bad idea. The reason is simple—on an average a new WordPress version is released every two months. If you...