WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a custom taxonomy "Portfolio Categories", and a few these categories say "Cloth", "Shoes", ...

When open some category page, i want the title to be like 'Site Name | Cloth', but with wp_title(), it becomes 'Site Name | Portfolio Categories | Cloth'

How do i remove the "Portfolio Categories" from the title?

share|improve this question
up vote 1 down vote accepted

Hi @Edward:

This is not a generic solution but will probably solve your needs. If you want to get rid of the '| Portfolio Categories' from your site's title just hook the 'wp_title' filter in your theme's functions.php file and remove that from the title string. Copy this code to the bottom of that file and modify as need be:

function your_wp_title($title) {
  $title = str_replace('| Portfolio Categories','',$title);
  return $title;
share|improve this answer
Pretty simple and straightforward, thanks – Edward Jan 12 '11 at 3:53
@Edward - Yes, sometimes what we need is simple, which is nice. :) – MikeSchinkel Jan 12 '11 at 18:45
@MikeSchinkel - I posted a similar question here, looking for the generic solution: wordpress.stackexchange.com/questions/29020/… – supertrue Sep 20 '11 at 18:21

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.