How to Create Title Tags in the WordPress Twenty Fifteen Header Template - dummies

How to Create Title Tags in the WordPress Twenty Fifteen Header Template

By Lisa Sabin-Wilson

Here’s a useful tip about your WordPress site’s <title> tag: Search engines pick up the words used in the <title> tag as keywords to categorize your site in their search engine directories.

The <title></title> tags are HTML tags that tell the browser to display the title of your website in the title bar of a visitor’s browser window.

Search engines love the title bar. The more you can tweak that title to provide detailed descriptions of your site (otherwise known as search engine optimization, or SEO), the more the search engines will love your site. Browsers will show that love by giving your site higher rankings in their results.

The site <title> tag is the HTML markup that lives in the source code of the live site between these two tag markers: <title></title>. In the default Twenty Fifteen theme, this bit of code looks like this:

add_theme_support( ‘title-tag’ );

The add_theme_support( title-tag ); in the functions.php template tells WordPress to place the title tag in the <head> section of the website. In plain English, the way the add_theme_support( title-tag ); function displays the title is based on the type of page that’s being displayed — and it shrewdly uses SEO to help you with the browser powers that be.

The title bar of the browser window always displays your site name unless you’re on a single post page. In that case, it displays your site title plus the title of the post on that page.

Within some of the WordPress template tags, such as the <title> tag in the earlier example, you may notice some weird characters that look like a foreign language. You may wonder what &raquo; is, for example; it isn’t part of any PHP function or CSS style. Rather, &raquo; is a character entity — a kind of code that enables you to display a special character. The &raquo; character entity displays a double right-angle quotation mark.