2011-06-27, 23:53:24
Carlos Wrote:So you're doing like Chris, but exchanging fields: the <title>... tag will always show the Page title field, but the body heading (<h1>...) your custom title (if defined).Oh, I actually apply this to the page title as well, but with yet another custom field. I just found it limiting to have a page called, say, "Search" with the same title and a H1 callled the same short string.
Interesting, a different approach.
Here's my titel tag v00d00, a little compressed:
Code:
<title><?php if (return_custom_field('titel')) {get_custom_field('titel'); echo ' – '; get_site_name();} else {get_page_clean_title(); echo ' – '; get_site_name();} ?></title>
From a SEO point-of-view it's better to have the desired keywords in both the title and the H1 element, but with this approach, I'm more flexible text-wise.