Chris Pearson and User-Functions.php

Add a Comment

Chris Pearson has put together a nice tutorial all about creating a user-functions.php file in your WordPress installation.

Do you enjoy your widget-ized sidebars? Then you have functions.php to thank. Theme developers can also use functions.php to add extra functionality to their themes. Just recently I customized a functions.php file in order to enable a theme options page, a method I’ll share with you later this week.

Here’s what Chris had to say:

One idea that immediately comes to mind is the creation of your own widgets (think sales boxes, special links, product descriptions, etc.). If you define functions for your most commonly-used widgets, you’ll be able to call them at any point in your theme’s code. This makes it much easier to test how certain elements will look on different parts of the page, which is useful for designers and amateur code-wranglers alike.

The benefit of using a user-functions.php, or a custom-functions.php (naming conventions are up to you), is that you can take your functions with you to any new theme you use, making transitions much smoother. He has also, not long ago, talked about adding a custom CSS file to your theme for added control.

Also, be sure to check out Pearson’s new Thesis theme. It looks pretty solid, from where I sit.