loop - Yoast taking over my Wordpress title tag

Closed. This question is off-topic. It is not currently accepting answers.Your question should be specific to WordPress.

Closed. This question is off-topic. It is not currently accepting answers.

Your question should be specific to WordPress. Generic PHP/JS/SQL/HTML/CSS questions might be better asked at Stack Overflow or another appropriate Stack Exchange network site. Third-party plugins and themes are off-topic for this site; they are better asked about at their developers' support routes.

Closed 5 years ago.

Improve this question

I have this code:

 <h1><?php the_title(); ?></h1>

That is meant to display the title of my blog post only. But because Yoast has a SEO title of something else, it is displaying that title on the page instead of the_title() eg:

It should be:

This is a title

And not what Yoast is doing:

This is a title - my site name

Closed. This question is off-topic. It is not currently accepting answers.

Your question should be specific to WordPress. Generic PHP/JS/SQL/HTML/CSS questions might be better asked at Stack Overflow or another appropriate Stack Exchange network site. Third-party plugins and themes are off-topic for this site; they are better asked about at their developers' support routes.

Closed 5 years ago.

Improve this question

I have this code:

 <h1><?php the_title(); ?></h1>

That is meant to display the title of my blog post only. But because Yoast has a SEO title of something else, it is displaying that title on the page instead of the_title() eg:

It should be:

This is a title

And not what Yoast is doing:

This is a title - my site name

Share Improve this question asked Jul 16, 2019 at 9:29 user8463989user8463989 5931 gold badge8 silver badges25 bronze badges 2
  • 1 That's not what the SEO title does/is for. Are you sure you haven't used wp_title() in your template by mistake? – Jacob Peattie Commented Jul 16, 2019 at 9:37
  • Ah, yeah. I was pulling in the wrong template which was wp_title(). Thanks! – user8463989 Commented Jul 16, 2019 at 9:40
Add a comment  | 

1 Answer 1

Reset to default 1

That's not what the SEO title does/is for. It appears that you've used the wp_title() function in your template by mistake.

wp_title() is intended for use in the <title> tag in the <head> for setting the browser tab/document title. However, since WordPress 4.1 this has been superseded (but not officially deprecated, yet) by add_theme_support( 'title-tag' ), so these days wp_title() really shouldn't be used.

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1745318106a4622313.html

相关推荐

  • loop - Yoast taking over my Wordpress title tag

    Closed. This question is off-topic. It is not currently accepting answers.Your question should be specific to WordPress.

    9小时前
    10

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信