lib/setup.php is used to enable/disable theme features and set configuration values. The theme features that can be disabled include:
Clean up from Soil:
Cleaner nav walker from Soil:
Relative URLs from Soil:
Nice search from Soil:
Enable loading jQuery from Soil:
lib/setup.php is also used to register navigation menus, sidebars, and define theme support for WordPress core functionality such as post thumbnails, post formats, and HTML5 markup.
The first part of the theme setup is making the theme translation available. Sage has over 35 community translations available thanks to our contributors.
Title tag support
add_theme_support('title-tag') is a feature added in WordPress 4.1 that allows themes and plugins to manage the document title. This means that there's no
<title> tag found in the head template since it's automatically added by
Register navigation menus
Sage registers a navigation menu called Primary Navigation. Additional menus should be added in the
register_nav_menus locations array.
Post thumbnails are enabled with
add_theme_support('post-thumbnails'), but they aren't output on any of the default templates. Add custom post thumbnail sizes with
Some WordPress post formats are enabled by default, but Sage doesn't provide any styling or templates for different post formats.
The TinyMCE editor in WordPress allows loading a custom stylesheet which is registered with
add_editor_style(). The editor stylesheet is automatically generated from your main theme stylesheet when you run the build script.
Sage registers two sidebars by default: Primary & Footer. Add additional sidebars with