14 key WordPress functions to jump-start theme development
New Post has been published on Reme Le Hane
14 key WordPress functions to jump-start theme development
After a few years (or even months) of designing and developing WordPress themes, especially for clients, you start to realize that a lot of the functionality can be standardized or distilled down into a “starter theme or kit”. This helps get the development process started and moving along apace. The best first step in doing this, I’ve found, is to nail down most of the common functions and include them in the functions.php. This functions.php file will need to be extended to meet the particular theme’s needs as new projects arise, but it will provide a more than awesome starting point for development. There are about 13 key functions that I like to start out with and will add to them as needed… 1. Custom menu support The navigation menu feature, introduced in WordPress 3.0, allows for the intuitive creation and maintaining of navigation menus in themes. At the very least, a standard theme will need a main navigation menu, perhaps in the header and a secondary navigation menu in the footer. To do this, we will register those two menus “Main Menu” and “Secondary Menu” While this isn’t a particularly new feature, its still nice to wrap it in an if function_exists() just in case the user is stuck in a pre 3.0 installation: In the functions.php file, include the following: if ( function_exists( 'register_nav_menus' ) ) { register_nav_menus( array( 'main_menu' => __( 'Main Menu',
http://www.webdesignerdepot.com/2013/05/1-key-wordpress-functions-to-jump-start-theme-development/?Tumblr









