Development,  WordPress

Add theme support – basics

add_theme_support is very important functions for developing themes. Thanks to this function, you may add many cool features to your theme. And forget about title tag in your templates (since WordPress 4.1).

Important notice: add_theme_support must be called before “init” hook is fired, because it is too late for some features. Use “after_setup_theme” hook or just put functions calls straight in your functions.php file.

Example 1: functions.php

Example 2: after_setup_theme hook

Leave a Reply

Your email address will not be published. Required fields are marked *