This is my first post on WordPress StackExchange, I'll try to be precise.
My question is: Is there anything in particular I should do to the files I'm including in my theme's functions.php file?
I'm creating a WordPress theme and my functions.php file is getting very big now. I managed to remove a lot of code by turning some functions into plugins but it is still huge.
I would like to be able to organize the code with includes. I tried a couple of things but it didn't work. It's like the files I included in my functions.php file are being ignored.
// Configure the WordPress Customizer
require(get_template_directory_uri() . '/admin/customizer/customizer.php');
The above code is supposed to call a file that's adding a function that creates sections, settings and controls in the WordPress Customizer. When the function is placed directly into my functions.php file everything works fine but when I try to include it, it does nothing.
The included file also contains includes, I don't know if this is of relevance.
The above code is hooked on after_setup_theme, if you think I should do anything differently please tell me, I want to learn.