{"id":6728,"date":"2009-09-28T22:47:28","date_gmt":"2009-09-28T22:47:28","guid":{"rendered":"https:\/\/wordpress.org\/plugins-wp\/override-post-title-with-first-content-heading\/"},"modified":"2009-12-21T19:59:33","modified_gmt":"2009-12-21T19:59:33","slug":"override-post-title-with-first-content-heading","status":"publish","type":"plugin","link":"https:\/\/pan.wordpress.org\/plugins\/override-post-title-with-first-content-heading\/","author":186678,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_crdt_document":"","version":"0.2.5","stable_tag":"trunk","tested":"2.9.2","requires":"2.7","requires_php":"","requires_plugins":"","header_name":"Override Post Title with First Content Heading","header_author":"Weston Ruter","header_description":"","assets_banners_color":"","last_updated":"2009-12-21 19:59:33","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"http:\/\/wordpress.org\/extend\/plugins\/override-post-title-with-first-content-heading\/","header_author_uri":"http:\/\/weston.ruter.net\/","rating":0,"author_block_rating":0,"active_installs":80,"downloads":4498,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","changelog"],"tags":[],"upgrade_notice":[],"ratings":{"1":0,"2":0,"3":0,"4":0,"5":0},"assets_icons":[],"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":[],"block_files":[],"assets_screenshots":[],"screenshots":[],"jetpack_post_was_ever_published":false},"plugin_section":[],"plugin_tags":[6257,20452,9808,186,1460],"plugin_category":[55],"plugin_contributors":[78438],"plugin_business_model":[],"class_list":["post-6728","plugin","type-plugin","status-publish","hentry","plugin_tags-h1","plugin_tags-h2","plugin_tags-heading","plugin_tags-seo","plugin_tags-title","plugin_category-seo-and-marketing","plugin_contributors-westonruter","plugin_committers-westonruter"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/override-post-title-with-first-content-heading.svg","icon_2x":false,"generated":true},"screenshots":[],"raw_content":"<!--section=description-->\n<p><em>This plugin is developed at\n<a href=\"http:\/\/www.shepherd-interactive.com\/\" title=\"Shepherd Interactive\nspecializes in web design and development in Portland, Oregon\">Shepherd\nInteractive<\/a> for the benefit of the community. No support is available.\nPlease post any questions to the <a href=\"http:\/\/wordpress.org\/tags\/override-post-title-with-first-content-heading?forum_id=10\">support\nforum<\/a>.<\/em><\/p>\n\n<p>On a singular post\/page, normally in The Loop <code>the_title()<\/code> returns \n    post_title; if, however, this needs to be overridden so that a\ncustom content heading is displayed (i.e. for SEO purposes), then an\n    h1 or <code>h2<\/code> element may be supplied at the beginning of\nthe <code>post_content<\/code> and the contents of this heading element\nwill be returned by <code>the_title()<\/code> instead of <code>post_title<\/code>.<\/p>\n\n<p>From a technical perspective, the site title in the main header should be\nan <code>h1<\/code> element and the page\/post title should in an <code>h2<\/code>\nelement within an <code>article<\/code>, <a href=\"http:\/\/www.whatwg.org\/specs\/web-apps\/current-work\/multipage\/sections.html#headings-and-sections\">per HTML5<\/a>:<\/p>\n\n<blockquote>Sections may contain headings of any rank, but authors are strongly\nencouraged to either use only `h1` elements, or to use elements of the\nappropriate rank for the section's nesting level.<\/blockquote>\n\n<p>This is seen in the default WordPress theme and the HTML specifications. However,\nSEO places higher priority on the contents of an <code>h1<\/code> element, so if\nevery page of a site has the exact same <code>h1<\/code> contents (the site name),\nthen search engines may not be as likely to rank the page based on the unique\ncontents of the <code>h2<\/code>. It has been <a href=\"http:\/\/blogsessive.com\/blogging-tips\/blog-seo-tips-titles\/\">suggested<\/a>\ntherefore that the <code>h1<\/code> and the <code>h2<\/code> elements be swapped,\nso that the site title appears in an <code>h2<\/code> and so that the unique page\ntitle appears in the <code>h1<\/code>. While the specifications don't prefer this\narrangement, it is not incorrect, also per HTML5:<\/p>\n\n<blockquote>Both of the documents are semantically identical and would produce the same\noutline in compliant user agents.<\/blockquote>\n\n<p>So if different heading levels are semantically equivalent, and if search\nengines really place that much importance on <code>h1<\/code>, then SEO wins.<\/p>\n\n<p>In both cases, content section headings should be coded with <code>h3<\/code> and\nbelow.<\/p>\n\n<p><em>Technical note:<\/em> If the <code>$post<\/code> object is not passed into <code>the_title<\/code>\nfilter, then the page's <code>the_title()<\/code> must be called before every other\n    the_title() call <code>in_the_loop()<\/code><\/p>\n\n<!--section=changelog-->\n<h4>2009-10-08: 0.2.5<\/h4>\n\n<ul>\n<li>Restricting first content heading searched for to be either <code>h1<\/code> or <code>h2<\/code>, for SEO purposes.<\/li>\n<\/ul>\n\n<h4>2009-09-28: 0.2.4<\/h4>\n\n<ul>\n<li>Initial release<\/li>\n<\/ul>","raw_excerpt":"On a singular post\/page, returns the contents of the first content H1 or H2 instead of the post_title as normally. Facilitates SEO.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/pan.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/6728","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/pan.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/pan.wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/pan.wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=6728"}],"author":[{"embeddable":true,"href":"https:\/\/pan.wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/westonruter"}],"wp:attachment":[{"href":"https:\/\/pan.wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=6728"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/pan.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=6728"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/pan.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=6728"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/pan.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=6728"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/pan.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=6728"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/pan.wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=6728"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}