{"id":454,"date":"2010-05-07T02:04:48","date_gmt":"2010-05-07T09:04:48","guid":{"rendered":"http:\/\/www.bryanhadaway.com\/?p=454"},"modified":"2025-05-22T15:31:49","modified_gmt":"2025-05-22T22:31:49","slug":"user-friendly-and-seo-friendly-title-structure-for-wordpress","status":"publish","type":"post","link":"https:\/\/webguy.io\/blog\/user-friendly-and-seo-friendly-title-structure-for-wordpress\/","title":{"rendered":"User-Friendly and SEO-Friendly Title Structure for WordPress"},"content":{"rendered":"<p>I personally find that this structure is the most user-friendly and SEO-friendly:<\/p>\n<pre><code>&lt;title&gt;&lt;?php wp_title( ' | ', true, 'right' ); ?&gt;&lt;\/title&gt;<\/code><\/pre>\n<p>which will result in:<\/p>\n<p><em>Name of Post | Name of Site<\/em><\/p>\n<p>For a live demo, reference this very blog.<\/p>\n<p><strong>UPDATE<\/strong> \u2014 While the above still works, you can now remove this from header.php and add the following to functions.php:<\/p>\n<pre><code>add_theme_support( 'title-tag' );<\/code><\/pre>\n<p>If you still wish to keep the | separator, you&#8217;ll now need to also add the following to functions.php:<\/p>\n<pre><code>add_filter( 'document_title_separator', 'generic_document_title_separator' );\r\nfunction generic_document_title_separator( $sep ) {\r\n$sep = \"|\";\r\nreturn $sep;\r\n}<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>I personally find that this structure is the most user-friendly and SEO-friendly: &lt;title&gt;&lt;?php wp_title( &#8216; | &#8216;, true, &#8216;right&#8217; ); ?&gt;&lt;\/title&gt; which will result in: Name of Post | Name of Site For a live demo, reference this very blog. UPDATE \u2014 While the above still works, you can now remove this from header.php and <a href=\"https:\/\/webguy.io\/blog\/user-friendly-and-seo-friendly-title-structure-for-wordpress\/\" class=\"more-link\">&#8230;<span class=\"screen-reader-text\">  User-Friendly and SEO-Friendly Title Structure for WordPress<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[39,20,4],"tags":[239,221,208,205],"class_list":["post-454","post","type-post","status-publish","format-standard","hentry","category-code","category-freebies","category-seo","tag-code","tag-freebies","tag-google","tag-seo"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/webguy.io\/blog\/wp-json\/wp\/v2\/posts\/454","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/webguy.io\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/webguy.io\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/webguy.io\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/webguy.io\/blog\/wp-json\/wp\/v2\/comments?post=454"}],"version-history":[{"count":0,"href":"https:\/\/webguy.io\/blog\/wp-json\/wp\/v2\/posts\/454\/revisions"}],"wp:attachment":[{"href":"https:\/\/webguy.io\/blog\/wp-json\/wp\/v2\/media?parent=454"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/webguy.io\/blog\/wp-json\/wp\/v2\/categories?post=454"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/webguy.io\/blog\/wp-json\/wp\/v2\/tags?post=454"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}