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 previously asked it in stackoverflow, but there was no answer!
I wish to change the title of Tags pages of my wordpress blog. What I want to do is to keep the Tag name as it's title only.

For example: If a tag name is "Wordpress Tag Pages Tutorial" then that tag should have the same title "Wordpress Tag Pages Tutorial" instead of "Blog Name - Wordpress Tag Pages Tutorial" so what to change in this code? I have tried but showing errors like only variables name in wordpress title.

<?php if (is_home () ) { bloginfo('name'); }elseif ( is_category() ) {
single_cat_title(); echo ' - ' ; bloginfo('name'); }
elseif (is_single() ) { single_post_title();}
elseif (is_page() ) { bloginfo('name'); echo ': '; single_post_title();}
else { wp_title('',true); } ?>

please see this screen-cast i.stack.imgur.com/Ai9JU.png

share|improve this question
up vote 1 down vote accepted

Use …

if ( is_tax( 'post_tag' ) )
    echo single_term_title();

I would just call a naked wp_title() and change that title per filter. See example 1, 2 and 3.

share|improve this answer

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.