Skip to content
This repository has been archived by the owner on Nov 14, 2024. It is now read-only.

Latest commit

 

History

History
29 lines (22 loc) · 833 Bytes

adding-theme-supports.md

File metadata and controls

29 lines (22 loc) · 833 Bytes
extends title group subgroup prev next order
docs
Adding theme supports
Basics
Setup
theme-filters
handling-translations
3

Configuration

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');