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 questionI 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 questionI 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 Answer
Reset to default 1That'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
wp_title()
in your template by mistake? – Jacob Peattie Commented Jul 16, 2019 at 9:37