E
E
Evloshevsky Nikolay2018-08-24 14:17:59
Search Engine Optimization
Evloshevsky Nikolay, 2018-08-24 14:17:59

WP YOAST SEO stubbornly adds to the title of the pages Site title, how to remove it?

If someone has the same problem - check in header.php output Title? in my case it was

<title><?php bloginfo('name'); ?><? wp_title(':'); ?></title>
- I replaced it with <title><?php wp_title("", true); ?></title>(although wp_title is outdated for current versions)
Site on Wordpress. The YOAST SEO plugin adds the site title to TITLE posts. How to remove website title from post title?
spoiler
5b7fe92faa5bb800216686.jpeg5b7fe9360cced945367266.jpeg5b7fe9394958d054977648.jpeg

Answer the question

In order to leave comments, you need to log in

2 answer(s)
Y
Yan Alexandrov, 2018-08-28
@n1k_crimea

Alternatively, remove the entire line from header.php
Then in function.php add title generation support:

function setup_theme() {
  add_theme_support( 'title-tag' );
}
add_action( 'after_setup_theme', 'setup_theme' );

Then, through the hook in the same place, in function.php, we remove the title from the internal pages:
add_filter( 'document_title_parts', 'mytheme_remove_title' );
function mytheme_remove_title( $title ){
  if ( !is_home() ) {
    $title['site'] = '';
  }
  return $title;
}

This is how it would be more correct.

R
rubtsoff, 2018-08-24
@rubsoff

Try like this
1) 1x.png
2) 2x1.png
3)3x2.png

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question