How to use add_action inside files included by theme’s functions.php August 26, 2022 by Tarik Billa Just wrap you include(s) in a function and hook it to after_setup_theme hook.