Multiple Functions Files
-
I am creating my own theme and want to have multiple functions files. My main function.php file is set up like this:
if ( ! function_exists( ‘my_theme_setup’ ) );
function my_theme_setup() {
require_once( get_template_directory() . ‘/includes/theme-support.php’ );
}
add_action( ‘after_setup_theme’, ‘my_theme_setup’ );…I require multiple functions files from the same “includes” folder, but you get the idea.
My question is, should I be doing this with the theme setup hook shown above or should I be using a different format? Because I would like to have all of my theme support functions (e.g., nav menus, post formats, post thumbnails, etc.) inside the “theme-support” file that I am requiring in the functions.php file, and I know I need to be doing this with the above action. HALP!!!
The topic ‘Multiple Functions Files’ is closed to new replies.