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 this function:

function suffusion_set_title() 
{
    global $suf_seo_enabled, $suf_seo_title_style, $suf_seo_title_separator, $suf_seo_show_subtitle, 
    $suf_seo_show_page_num, $paged, $page;

    if ($suf_seo_enabled != 'enabled') {

        if (is_home() || is_front_page()) 
        {
            echo "\t<title>".wp_title('', false)."</title>\n";
        }
        else {
            echo "\t<title>".wp_title('&raquo;', false)."</title>\n";
        }
        return;
    }

    $page_title = wp_title('', false);
    $blog_title = get_bloginfo('name');

    if (is_home() || is_front_page()) {
        $title = $blog_title;
        if ($suf_seo_show_subtitle == 'show') {
            $blog_subtitle = get_bloginfo('description');
            $title .= " ".$suf_seo_title_separator." ".$blog_subtitle;
        }
    }
    else {
        if ($suf_seo_title_style == 'page-blog') {
            $title = $page_title." ".$suf_seo_title_separator." ".$blog_title;
        }
        else if ($suf_seo_title_style == 'blog-page') {
            $title = $blog_title." ".$suf_seo_title_separator." ".$page_title;
        }
        else {
            $title = $page_title;
        }
    }
    if ($suf_seo_show_page_num == 'show' && ($paged >= 2 || $page >= 2)) {
        $title .= ' '.$suf_seo_title_separator.' '.sprintf(__('Page %s', 'suffusion'), max($paged, $page));
    }
    $title = apply_filters('suffusion_set_title', $title);
    echo "\t<title>{$title}</title>\n";
}

and I am trying to change how the title appears for some pages, but when I make edits here, they do not show up when I make those edits live.

I use Yoast. Is it possible that Yoast overwrites the values for the tag?

I use suffusion theme, and this function is in the actions.php file.

The way I have it now, the home page's title is correct. The content pages title is correct. But the category pages get the homepage title appended to their titles.

And what I am trying to do is append a custom string to those titles and not the string that is currently appended.

Would anyone know how to accomplish that? Thanks!

share|improve this question
add comment

1 Answer 1

up vote 1 down vote accepted

I use Yoast. Is it possible that Yoast overwrites the values for the tag?

Yes, it is.

add_filter( 'wp_title', array( $this, 'title' ), 15, 3 );

Snippet above come from "WP SEO by Yoast". In version 1.4.13 it is in line 53 of class-frontend.php

share|improve this answer
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.