Include a php file from functions.php only to homepage
You can use is_home() or is_front_page() to check the current page. $sage_includes = [ ‘lib/assets.php’, // Scripts and stylesheets ‘lib/theme_options.php’, // Theme Options ‘lib/setup.php’, // Theme setup ‘lib/titles.php’, // Page titles ‘lib/wrapper.php’, // Theme wrapper class ‘lib/shortcodes.php’ // Old Theme Shortcodes ]; if(is_home() || is_front_page()){ $sage_includes[] = ‘lib/home_shortcodes.php’; // Homeapage Shortcodes }