HomeProgrammingWordPress title suffix plugin

WordPress title suffix plugin

I read some research recently which seems to show that keywords matter to search engines in your site’s “title” tag. Not only that, but position matters. Preferably your page title should precede your site title. Unfortunately WordPress is coded to make that sort of ugly. If you simply reverse the wp_title and wp_bloginfo(‘name’) calls, you get ugliness in two ways. If what you want is “keyword – sitename”, then you have to live with the default title for your site looking like “- sitename”. Ugly. Then if you are on a titled page, you get “» keyword – sitename”. I don’t know about you, but I think that’s ugly too. So, enjoy my tiny little WordPress plugin. It will strip out the leading “»” and will not put the dash in unless there is something preceding it. I’m no PHP god, but that was both easy and fun, due to the “hook” system WordPress implements so nicely. You’ll still have to reorder your themes to have “wp_title” listed before the sitename, but at least it will look prettier now. Download: wp-title-suffix.zip


I started out going to college for Business administration but soon found out that Coding would be a great way to have a sustainable career! I made coder's eye as my personal journey on learning how to code and sharing my Findings along the way. My vision with CE now is to be a way to help beginners that want to learn code but don't know where to start.


Sorry, the comment form is closed at this time.