Browser title script ignoring is_page /else conditional [closed]

I’ve used this code to stipulate different separators for different pages in my clients site:

<title>
<?php if(is_page('Portfolio')){
    wp_title( 'of', true, 'right' );
    echo wp_specialchars( get_bloginfo('name'), 1 );
}else{
    wp_title( 'by', true, 'right' );
    echo wp_specialchars( get_bloginfo('name'), 1 );
}
    ?>
</title>

What it’s outputting regardless of where I am on the site is :

Page Name | Blog Name

Which i find really odd, how is it going through the if statement and coming up with it’s own answer?

1 Answer
1

OK, All-in-one-SEO pack was interfering with my decalration. Solved.

Leave a Comment