How to set your WordPress Page Title

Whether creating a page or a post, the WordPress title input is provided in the editor so that WordPress can effectively generate the title. Your theme should then declare its title as <title>.

where to enter page title wordpress

 

However, you may want to introduce a title separator (e.g. :, |, -, or >>) or a sitename after the actual title like in the example below:

 

“How to create title tag on WordPress – SEOptimer”

 

Note: We strongly recommend not adding a separator or sitename in the actual WordPress title input field since it will also display on the actual page or post.

 

Click here to learn more about how to create title tags.

 

With some themes, titles will be the actual H1 heading for your page or post.

 

Here is our SEOptimer’s Guide to Header Tags example:

header tag example

 

Here we see the title displayed as <title>:

title tag

 

It is also displayed as the <h1> tag:

h1 tag wordpress

 

You can use several WordPress plugins to create title tags that won’t display on the actual page or post.

 

Should you create a dynamic WordPress title tag without a plugin?

 

There’s a few how-to guides regarding how to add title tags in WordPress without a plugin. However, doing this presents a small problem: adding meta descriptions. Most SEO plugins that allow you to add title tags also offer meta description input. (We’ll provide more information about these plugins later in this guide.)

 

If a plugin offers both title tag and meta description input, then what is the point in having a dynamic title tag? Meta description should not be dynamic or a copy of the first few sentences and should be standalone text that helps search engines understand the content of that specific page.

 

Click here to learn more about meta descriptions.

 

We understand that to truly create an optimized WordPress site, using fewer plugins is always best. WordPress is a resource intensive platform; if you are running a shared hosting account, you are sharing the number of resources available within that group. If one site in the shared account group requires extra bandwidth, it borrows from other sites within that group, eventually causing your site to require more bandwidth.

 

You cannot use plugins and create dynamic title tags by editing your header.php file. So, it’s fairly safe to say that having a plugin for creating title tags is the best option, simply because it will solve the meta description issue.

 

How can title tags be generated dynamically?

 

We’ve added a guide in case you want to learn more about how title tags can be generated dynamically. Its purpose is to help you understand that plugins are the best option when improving SEO for your site.

 

Here’s how it works:

 

You’ll first need to create a title in your WordPress site.

 

Our example of the title will be “How to create title tag on WordPress – SEOptimer”.

 

You must enter the Site Title (SEOptimer, as an example).

 

You can edit this title under Settings > General > Site Title:

how to create a site title wordpress

 

Once you’ve added your Site Title, you must  go to Appearance > Editor > Header.php:

add site tile wordpress

 

The main file might vary depending on the theme you selected for your site. In this case, the header.php file is under the name Theme Header:

header.php wordpress

 

Locate the <head> element in the header.php file:

 <head> element in the header.php file

 

Within the <head> element you must add the following code:

 

<head>
<title><?php wp_title(‘ | ‘, ‘echo’, ‘right’); ?><?php bloginfo(‘name’); ?></title>
</head>

 

This will then provide input based on what the page is about:

 

  • The Home page – outputs the name of the site
  • Individual pages – page title | name of site
  • Single post views – post title | name of site
  • Archived post views – outputs the name of the site
  • Date-based archives – year and/or month | name of site
  • Category archives – category title | name of site
  • Author archives – public username | name of site
  • 404 error pages – outputs the name of the site
  • Search results – outputs the name of the site
  • Tag archives – tag name | name of site

 

In some cases, you do not want to use the dynamic “name of site”. For instance:

 

How to create dynamic titles on WordPress | SEOptimer

 

Instead, use:

 

How to create dynamic titles | WordPress | SEOptimer

 

Including additional separators can help users identify and easily digest your intent.

 

Here’s an example of Search Engine Watch displaying their title tag on SERP:

 

In order for you to accomplish this, you must enter that separator in the actual post title:

add a separator to title tag

 

However, you do not want to use the separator within the title post itself, as it will display like this (screenshot below):

separator in title

 

In the Search Engine Watch example, their title does not show any separators:

example not to use separators

 

To truly optimize your title tag based on user intent within WordPress, we strongly recommend using a plugin.

 

How to add title tags with a WordPress plugin

 

Yoast and All in One SEO are the two most popular plugins to help with your title tag needs. They are fully customizable.

Adding title tags with the Yoast plugin

With Yoast, you can use their SEO title section to create your title. Their plugin should remove <title> from the theme files and replace it with theirs. If you want to default your settings to include a separator or sitename in your page or post title (not recommended), you can add those criteria under Yoast > Search Appearance > Content Types:

how to add title tag yoast plugin

 

As seen above, if you enable this, your WordPress title will be added along with the page number, separator and sitename.

 

You can add different snippet variables to each section, such as posts, pages, products and others to automate your title, page, separator, and site title. Simply select which section you want to create a snippet variable for:

create snippet variable wordpress

 

Be sure to get in the habit of editing each title within the page or post you’re creating. It is entirely up to you to enable or disable this feature so you can enter each individual title tag.

 

To modify the title tag for a specific page or post, go to the actual page and, just below the WYSIWYG editor, find “Yoast SEO”. Click on either the Title or Edit snippet button:

how to edit snippet yoast seo

 

Here you will see the defaulted settings for your SEO Title, which you can remove to add your own.

Yoast SEO defaulted settings

 

Adding title tags with the All in One SEO plugin

Another great plugin you can use is the All in One SEO plugin. While each plugin has its own features and benefits, both are great options when it comes to adding title tags.

 

You can update your title tag just underneath the WYSIWYG editor of the page or post you want to update.

update title tag WYSIWYG editor

 

Although the best practice is to remove all formatting, you can also enable formats in All in One and enter each page or post title manually. The format is similar to that of Yoast’s snippet variable.

 

Go to the All in One SEO section of the WordPress dashboard > General Settings:

all in one seo menu general settings

 

Here you have the option of rewriting titles (enabled), capitalizing search titles and page title format:

rewriting titles enabled capitalizing search titles page title format

 

If you click on the question mark, you’ll find more information, where you can find the following format:

click question mark all in one seo

 

Separators can be added between each format. If you simply want to automate your site’s name, you can add  “- SEOptimer” and add any of the following formats previously mentioned:

 

%blog_title% – Your blog title

%blog_description% – Your blog description

%post_title% – The original title of the post

%category_title% – The (main) category of the post

%1$category% – Alias for %2$category_title%

%post_author_login% – This post’s author’ login

%post_author_nicename% – This post’s author’ nicename

%post_author_firstname% – This post’s author’ first name (capitalized)

%post_author_lastname% – This post’s author’ last name (capitalized)

%current_date% – The current date (localized)

%post_date% – The date the post was published (localized)

%post_year% – The year the post was published (localized)

%post_month% – The month the post was published (localized)

 

user-gravatar
Jay Kang

Putting all things SEO under a microscope. I'm an experimentalist, researcher, recording every step of how to rank number 1. Here to help, verify, explain, cross-examine the wonders of search engine.





SEOptimer Report Preview

SEOptimer - SEO Audit & Reporting Tool.
Improve Your Website. Win More Customers.

Get a Free Website Audit Instantly