DiggingIntoWordPress

by Chris Coyier & Jeff Starr

Daily archives: Tuesday, August 18, 2009

10 Useful WordPress Hook Hacks

Smashing Magazine with a characteristically nice set of tricks for WordPress, this time revolving around hooks. You can attach your own functions to hooks in that funny file functions.php that everyone is raving about. Neat ideas including entering default text directly into the TinyMCE Editor, and putting entire Post contents into a PHP variable.

Remember though that functions.php is theme-specific, so in my opinion should be used for things that are specific to a given theme, while content and admin things should be left to plugins.

Code is poetry