extends | title | group | subgroup | prev | next | order |
---|---|---|---|---|---|---|
docs |
Adding theme supports |
Basics |
Setup |
theme-filters |
handling-translations |
3 |
Theme supports have to be registered inside app/Setup/supports.php
file on after_setup_theme
action hook. Most common supports are already enabled. However, feel free to add or remove entries there.
Take a look at Codex for all available support options.
Simply call add_theme_support()
function with choosen option inside hooked function.
namespace Tonik\Theme\App\Setup;
use function Tonik\Theme\App\config;
function add_theme_supports()
{
add_theme_support('post-thumbnails');
}
add_action('after_setup_theme', 'Tonik\Theme\App\Setup\add_theme_supports');