app/ directory contains all the theme functionality.
Since Sage is a starter theme, it’s okay for you to modify files within
app/ to meet the needs of the site you’re building.
The PHP code in Sage is namespaced (opens new window), so make sure to use namespaced functions and classes (opens new window).
app/setup.php– Enqueue stylesheets and scripts, register support for theme features with
add_theme_support, register navigation menus and sidebars. See Theme Configuration and Setup.
app/filters.php– Add WordPress filters in this file. Filters included by default:
excerpt_more– add "… Continued" to excerpts.
app/Providers- The place for any Service Providers (opens new window) you care to define for your theme. Comes with
ThemeServiceProviderthat adds no functionality but provides a template for your own Service Providers.