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.
Most of the PHP code in Sage is namespaced and autoloaded, so make sure to use namespaced functions and classes. If you aren't familiar with these methods, see our blog posts on:
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 you care to define for your theme. Comes with
ThemeServiceProviderthat adds no functionality but provides a template for your own Service Providers.
Help us continue to build and maintain our open source projects. We’re a small team of independent developers and every little bit helps.Sponsor Roots on GitHub