Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I have a custom taxonomy called 'Genres' within that I have various taxonomies: 'Paintings' 'Drawings' etc. I use the code below to create my page titles.

When viewing the taxonomy page for 'Paintings' I get a page title 'Paintings | Genres | BlogName' whereas I wanted to display only: 'Paintings | BlogName', how can I do that?

<title><?php
    /* Print the <title> tag based on what is being viewed */
    global $page, $paged;

    wp_title( '|', true, 'right' );

    // Add the blog name.
    bloginfo( 'name' );

    // Add the blog description for the home/front page.
    $site_description = get_bloginfo( 'description', 'display' );

    if ( $site_description && ( is_home() || is_front_page() ) )
        echo " | $site_description";    
    ?></title>
share|improve this question
add comment

1 Answer 1

up vote 1 down vote accepted

You should use the wp_title filter, see: other question

They are creating a separate function that handles the output.

share|improve this answer
    
perfect, thank you!! –  Andy May 14 at 20:37
add comment

Your Answer

 
discard

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.