I want a specific title (<title>My Title!</title>
) all over the pages of my website. If I just edit the header.php with <tit开发者_如何转开发le>My Title!</title>
it doesn't work and display the default title of the Wordpress. how can I change it? I know there is a function wp_title() but I dont think it helps.
Thank you.
You just need to edit header.php. Are you sure youre editing the correct header.php file?
If you edit it under Appearance->editor->header.php in your admin youll be sure to be editing the correct one.
Look for wp_head in the header.php file... Removing the wp_head might cause you some other problems like a plugin not functioning well or so. Be careful with that, and i dont understand why u want to have the same title all over your site.
Include this to the header.php(after tag):
<title><?php if(is_home()) { echo bloginfo('name'); echo " - "; echo "Home";} else {
echo wp_title(" - ", false, right); echo bloginfo(‘name’); } ?></title>
精彩评论