WordPress 4.1 has been a long-awaited release for theme developers. Not only does this version ship with the awesome Twenty Fifteen theme, but also with a number of new functions and features that make theme development faster and easier. In this post, we’ll have a look at these new features and show you how to use them in your themes.
Auto-generated Title Tags
Until the release of WordPress 4.1, each theme contained its own implementation of the
<title> tag. This code often varied from theme to theme, making it difficult for plugins — for example SEO plugins — to customize the content of the title tags.
The new, recommended approach is to leverage the
add_theme_support() function by declaring support for
By declaring theme support, you indicate to WordPress that the title tag should be auto-generated. This is done using the private function
_wp_render_title_tag(), which is hooked to
wp_head. You can still use the
View original post 847 more words