Wordpress post title rearrangement
I had the All-in-one SEO package installed and I thought it took care of the titles but it didn’t. The only thing in the title tag was the blogs name/title. Even though the settings in the SEO plugin were set properly, it just refused to show the post title in the main title. I even tried setting the custom title for a post individually and that didnt work either. Sucks really coz all the pages in google had only one title, the title of the blog.
I eventually disabled the plugin and the titles were reverted back to Wordpress default. Blog name – Post title. I didnt want that either. I want Post title | Blog name. I checked the template header file and rearranged the wp_title() function and the bloginfo(‘name’) variable. There was still a problem with that, the separator was still on the left side. The title looked like this ” » Post title | Blog name “.
I went on to codex and researched a bit, unlike the older versions wp_title() does take parameters. Setting the right parameters can help customize the way the title of the post is displayed. Here is an example, one I used for this blog.
Originally
1 | <?php bloginfo('name'); ?><?php wp_title(); ?> |
This resulted in a Title of this format. “Blogname » Post title”
You can change that to this
1 | <?php wp_title('|',true,'right'); ?><?php bloginfo('name'); ?> |
This results in a title of this format “Post title | Blogname”
A small tweak but really helpful when you want your search listings proper.
For more information and customizations of your own read the wp_title() documentation here. Template Tags/wp title






Find me online