Skip to content

Meta Title Tag

Tran Ngoc Tuan Anh edited this page Feb 27, 2019 · 2 revisions

You don't need to configure meta title tag. WordPress already has this featured! All we need to do is add theme support for title-tag.

add_theme_support( 'title-tag' );

We already do that hundreds times while coding themes. And I see that WordPress does this pretty well.

By default, the title tag will have the following format:

  • For homepage: Site title – Site description
  • For singular pages/posts: Page/Post title – Site title
  • For other pages: Page title – Site title

This format is pretty good.

Clone this wiki locally