Google friendly header idea from Codex?
-
The following header code I found in the Codex, doesn’t work. Why? The error message is “Parse error: parse error, unexpected ‘,’, expecting ‘)’ in /mysite/mysite/mysite/wp-content/themes/mysite/header.php on line 16
I started with code from this page of the Codex:
http://codex.wordpress.org/User:Yami_McMoots/My_HeaderSo the behavior of wp_title() isn’t optimized for Googliciousness. Here’s how I have my page title set up in header.php:
<title>
<?php if (is_home () ) {
bloginfo('name');
} elseif ( is_category() ) {
bloginfo('name'); echo ": "; single_cat_title();
} elseif (is_single() || is_page() ) {
single_post_title();
} elseif (is_search() ) {
bloginfo('name'); echo " search results: "; echo wp_specialchars($s);
} else { wp_title(,true); }
?>
</title>Can someone troubleshoot that code?
The topic ‘Google friendly header idea from Codex?’ is closed to new replies.