Customizing Page Titles
-
Hi guys,
For SEO reasons, I am trying to get my page titles to display a specific title on my home page and different titles on all the other pages.
A good example of this in action is at Problogger.net
At present, my index page displays the title ‘Internet & Search Engine Marketing Tips – Web Stimulation’.
If I go to any other pages though, it only displays the page or post title and nothing else.
How do I get it to display the page or post title followed by ‘- Web Stimulation’?
Oh and at the moment, I am not using the bloginfo() command and am using the if_home() command.
So at present my code is:
<title><?php if(is_home()) { echo ‘Internet & Search Engine Marketing Tips – Web Stimulation’; } else wp_title(”); ?></title>
If there is a better way to do this, then by all means let me know.
I can’t figure out how to code the else statement so it appends ‘– Web Stimulation‘ to the post or other page titles.
So, except for the home page, I want the other page titles to just be the name of the page or post followed by ‘- Web Stimulation’.
Otherwise they are far too long.
Note, that I would like a hyphen in the page title and not the >> or whatever.
I have looked at the other ‘page title’ threads already, but have not found a solution and I am new to PHP and WordPress.
So apologies if the solution is elsewhere.
Thanks in advance guys.
Take it easy.
- The topic ‘Customizing Page Titles’ is closed to new replies.