At times you may need to add code to your themes functions.php file. I personally like to keep my functions file and other theme files as clean and organized as possible. When making large modifications like converting your genesis child theme into html5, it makes most sense to incorporate a custom functions file. A few other examples of times to use a custom functions file would be when adding a custom post type or custom taxonomy to a theme, adding admin functions, or just to keep your edits to the theme separate.
- Create a folder within your child theme named “lib”
- Within the new “lib” folder, create a file named “my_functions.php”
<?php /** * My Custom Functions */
- Paste this code in your themes current functions.php file
// Add My Custom Functions File include_once( get_stylesheet_directory() . '/lib/my_functions.php' );