So for most Wordpress users this may sound familiar.
You make an active child-theme and a functions.php. After a while this php file will be filled with many action/filter hooks. Some for Wordpress itself, others for plugins. This makes it (to me) a hot mess. It's hard to keep an overview what's going on without making big blocks of comments.
How can one best approach this? I was considering turning the php into plugins or make separate php files which are included with the functions.php.
What would be the best practice and give the best performance?
inc directory within your WordPress child theme's root and add categorized function files within that. Then include them in your functions.php file:
- js - css - inc general.php cpt_first.php cpt_second.php navigation.php - ... functions.php