Customize your Wordpress title
Do you want your Worpress blog to display “Blog Name >> My Blog Post”, which gets the job done but will likely cut off some of your title in the search engine results OR would you like to customize your blog title display to look like these examples below? Making them more search engine friendly:
- “My Blog Post Title” code =
-
<title><?php wp_title(''); ?><?php if(wp_title(' ', false)) { echo ' | '; } ?> -
<?// php bloginfo('name'); ?></title>
-
- “My Blog Post Title >> Blog Name” code=
-
<title><?php wp_title(''); ?><?php if(wp_title(' ', false)) { echo ' >> '; } ?> -
<?php bloginfo('name'); ?></title>
-
- “My Blog Post Title by Blog Name” code =
-
<title><?php wp_title(''); ?><?php if(wp_title(' ', false)) { echo ' by '; } ?> -
<?php bloginfo('name'); ?></title>
-
All of these options will display only the Blog name on pages where there is no Title (i.e. The home page) This portion of the code cares for that <?php if(wp_title(' ', false)) { echo ' | '; } ?>
All of these options are possible by adding the code displayed above to your template Header.php file. All of the code beneath each example (between the title tag) should be placed together.
For more information and details see www.ardamis.com


