Title in Header.php Tweaking
-
Hello all,
I’d like to change the title of my page (defined in header.php) from:
<title><?php if ( is_home() ) { ?><? bloginfo('name'); ?> <?php } else {wp_title(''); ?> - <? bloginfo('name'); } ?></title>To:
<title> <?php if(is_home()) { } ?> <?php elseif(is_404()) { ?> 404 (Page Not Found) - <?php } ?> <?php elseif(is_search()) { ?> Search Results for <?php echo wp_specialchars($s, 1); ?> - <?php } else { ?> <?php wp_title(); ?> - <?php } ?> <?php bloginfo('name'); ?> </title>However, it’s giving me the following error:
Parse error: syntax error, unexpected T_ELSEIF in /wp-content/themes/default/header.php on line 10
I’m a bit fresh when it comes to PHP, and I can’t figure out exactly what is wrong with my code syntax. Any help would be much appreciated.
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
The topic ‘Title in Header.php Tweaking’ is closed to new replies.