Title: Override Post Title with First Content Heading
Author: Weston Ruter
Published: <strong>28. september, 2009</strong>
Last modified: 21. december, 2009

---

Søg plugins

Dette plugin **er ikke blevet testet med de seneste 3 større udgivelser af WordPress**.
Det vedligeholdes eller understøttes muligvis ikke længere og kan have kompatibilitetsproblemer,
når det bruges med nyere versioner af WordPress.

![](https://s.w.org/plugins/geopattern-icon/override-post-title-with-first-content-
heading.svg)

# Override Post Title with First Content Heading

 Af [Weston Ruter](https://profiles.wordpress.org/westonruter/)

[Download](https://downloads.wordpress.org/plugin/override-post-title-with-first-content-heading.zip)

 * [Detaljer](https://da.wordpress.org/plugins/override-post-title-with-first-content-heading/#description)
 * [Vurderinger](https://da.wordpress.org/plugins/override-post-title-with-first-content-heading/#reviews)
 * [Udvikling](https://da.wordpress.org/plugins/override-post-title-with-first-content-heading/#developers)

 [Support](https://wordpress.org/support/plugin/override-post-title-with-first-content-heading/)

## Beskrivelse

_This plugin is developed at
 [Shepherd Interactive for the benefit of the community. No support is available. Please post any questions to the [support forum.](https://wordpress.org/tags/override-post-title-with-first-content-heading?forum_id=10)

On a singular post/page, normally in The Loop `the_title()` returns
 post_title;
if, however, this needs to be overridden so that a custom content heading is displayed(
i.e. for SEO purposes), then an h1 or `h2` element may be supplied at the beginning
of the `post_content` and the contents of this heading element will be returned 
by `the_title()` instead of `post_title`.

From a technical perspective, the site title in the main header should be
 an `h1`
element and the page/post title should in an `h2` element within an `article`, [per HTML5](http://www.whatwg.org/specs/web-apps/current-work/multipage/sections.html#headings-and-sections):

> Sections may contain headings of any rank, but authors are strongly
>  encouraged
> to either use only `h1` elements, or to use elements of the appropriate rank for
> the section’s nesting level.

This is seen in the default WordPress theme and the HTML specifications. However,

SEO places higher priority on the contents of an `h1` element, so if every page 
of a site has the exact same `h1` contents (the site name), then search engines 
may not be as likely to rank the page based on the unique contents of the `h2`. 
It has been [suggested](http://blogsessive.com/blogging-tips/blog-seo-tips-titles/)
therefore that the `h1` and the `h2` elements be swapped, so that the site title
appears in an `h2` and so that the unique page title appears in the `h1`. While 
the specifications don’t prefer this arrangement, it is not incorrect, also per 
HTML5:

> Both of the documents are semantically identical and would produce the same
>  outline
> in compliant user agents.

So if different heading levels are semantically equivalent, and if search
 engines
really place that much importance on `h1`, then SEO wins.

In both cases, content section headings should be coded with `h3` and
 below.

_Technical note:_ If the `$post` object is not passed into `the_title`
 filter, 
then the page’s `the_title()` must be called before every other the_title() call`
in_the_loop()`

## Anmeldelser

Der er ingen anmeldelser for denne widget.

## Bidragsydere & udviklere

“Override Post Title with First Content Heading” er open source-software. Følgende
personer har bidraget til dette plugin.

Bidragsydere

 *   [ Weston Ruter ](https://profiles.wordpress.org/westonruter/)

[Oversæt “Override Post Title with First Content Heading” til dit eget sprog.](https://translate.wordpress.org/projects/wp-plugins/override-post-title-with-first-content-heading)

### Interesseret i udvikling?

[Gennemse koden](https://plugins.trac.wordpress.org/browser/override-post-title-with-first-content-heading/),
tjek [SVN repository](https://plugins.svn.wordpress.org/override-post-title-with-first-content-heading/),
eller abonner på [udviklerloggen](https://plugins.trac.wordpress.org/log/override-post-title-with-first-content-heading/)
via [RSS](https://plugins.trac.wordpress.org/log/override-post-title-with-first-content-heading/?limit=100&mode=stop_on_copy&format=rss).

## Ændringslog

#### 2009-10-08: 0.2.5

 * Restricting first content heading searched for to be either `h1` or `h2`, for
   SEO purposes.

#### 2009-09-28: 0.2.4

 * Initial release

## Meta

 *  Version **0.2.5**
 *  Senest opdateret **17 år siden**
 *  Aktive installationer **70+**
 *  WordPress-version ** 2.7 eller højere **
 *  Testet op til **2.9.2**
 *  Sprog
 * [English (US)](https://wordpress.org/plugins/override-post-title-with-first-content-heading/)
 * Tags
 * [h1](https://da.wordpress.org/plugins/tags/h1/)[h2](https://da.wordpress.org/plugins/tags/h2/)
   [heading](https://da.wordpress.org/plugins/tags/heading/)[seo](https://da.wordpress.org/plugins/tags/seo/)
   [title](https://da.wordpress.org/plugins/tags/title/)
 *  [Avanceret visning](https://da.wordpress.org/plugins/override-post-title-with-first-content-heading/advanced/)

## Bedømmelser

Der er endnu ikke indsendt nogen anmeldelser.

[Din anmeldelse](https://wordpress.org/support/plugin/override-post-title-with-first-content-heading/reviews/#new-post)

[Se alle anmeldelser](https://wordpress.org/support/plugin/override-post-title-with-first-content-heading/reviews/)

## Bidragsydere

 *   [ Weston Ruter ](https://profiles.wordpress.org/westonruter/)

## Support

Har du noget at sige? Har du brug for hjælp?

 [Vis supportforum](https://wordpress.org/support/plugin/override-post-title-with-first-content-heading/)