I removed in the header.php the line “<meta name=”description” content=”<?php wp_title(); echo ‘ | ‘; bloginfo( ‘description’ ); ?>” />”
I hope this is correct… the source code shows now only the meta description of yoast.
But I sill have a problem with the title in the source code. It’s always a combination of the standard title and the title set in yoast. But I just want the title which I’ve set in yoast.
How can I solve this?
Christian
Hi Christian,
You can try adding this? `<title><?php wp_title(”); ?></title>
Let me know if works.
Mario
Hi Mario
This is a part of the head. Which of the code mus be replaced by <title><?php wp_title(”); ?></title>
<!DOCTYPE html>
<!--[if lt IE 7 ]><html class="ie ie6" <?php language_attributes();?>> <![endif]-->
<!--[if IE 7 ]><html class="ie ie7" <?php language_attributes();?>> <![endif]-->
<!--[if IE 8 ]><html class="ie ie8" <?php language_attributes();?>> <![endif]-->
<!--[if IE 9 ]><html class="ie ie9" <?php language_attributes();?>> <![endif]-->
<!--[if (gt IE 9)|!(IE)]><!--><html <?php language_attributes();?>> <!--<![endif]-->
<head>
<title><?php if ( is_category() ) {
echo theme_locals("category_for")." ""; single_cat_title(); echo '" | '; bloginfo( 'name' );
} elseif ( is_tag() ) {
echo theme_locals("tag_for")." ""; single_tag_title(); echo '" | '; bloginfo( 'name' );
} elseif ( is_archive() ) {
wp_title(''); echo " ".theme_locals("archive")." | "; bloginfo( 'name' );
} elseif ( is_search() ) {
echo theme_locals("fearch_for")." "".esc_html($s).'" | '; bloginfo( 'name' );
} elseif ( is_home() || is_front_page()) {
bloginfo( 'name' ); echo ' | '; bloginfo( 'description' );
} elseif ( is_404() ) {
echo theme_locals("error_404")." | "; bloginfo( 'name' );
} elseif ( is_single() ) {
wp_title('');
} else {
wp_title( ' | ', true, 'right' ); bloginfo( 'name' );
} ?></title>
<meta charset="<?php bloginfo( 'charset' ); ?>" />
<meta name="viewport" content="width=device-width, initial-scale=1.0">
I think the problem will also be solved, when I check “force rewrite titles” in yoast. But I don’t know if this has any further undesired impacts.
Hi Chrigel,
Did you try replacing the all content into <title> tags with <?php wp_title(); ?>?
Then go to yoast and save the options too. I think it should works. If not i’ll need know the page that you’re having the issue and template used.
Let me know.
Thanks
Mario
All my titles are now the same after upgrading WordPress to 3.7.1
wp_title() just outputs the blog name, no matter what page you’re on.
epic fail?
I updated all my plugins, one of them was causing the issue, but it’s all fixed now
Hi
I changed the code now to:
<title><?php wp_title(''); ?></title>
And it seems to be okay now.
Thank you.
Christian
@dtbaker, could you tell us which plugin was causing the issue?
great @chrigel, you can mark as resolved?
Thanks
Mario