wordpress - homepage custom title - other title seo optimized
How to make your homepage title custom and other titles of your wordpress blog seo optimized?
Please use this on your own risk only with wordpress installations!!
If you do not use a plug-in to create seo - optimized titles or some other plug-in dynamic changing the title tag, you can use this method.
Make a backup of the header.php file in the themes folder of your wordpress theme. Just for security reasons, if you will go back to your old header.php file. Open in a text editor the header.php file in the themes folder of your wordpress theme.
Find the following code:
-
<title><?php wp_title(”); ?> <?php if ( !(is_404()) && (is_single()) or (is_page()) or (is_archive()) ) { ?> at <?php } ?> <?php bloginfo(‘name’); ?></title>
or similar, like this:
-
<title> … </title>
Replace the code, with this code:
-
<?php if(is_home()) { ?><title>your custom title here</title><?php } else { ?><title><?php wp_title(”); ?> <?php if ( !(is_404()) && (is_single()) or (is_page()) or (is_archive()) ) { ?> at <?php } ?> <?php bloginfo(‘name’); ?></title><?php } ?>
and change the text “your custom title here” with your title text you like for the homepage. Upload the file and test it.
It should now show your custom title on the homepage and on other pages the seo optimized one.
Please use this on your own risk!!

