An extra ' is displayed in the title

I've found a string that's showing the posts title - blogname as title in the browser, but it's adding an extra '

This is the code I'm using:

title?php wp_title(‘ | ‘, ‘echo’, ‘right’); ?  - ?php bloginfo(‘name’); ?/title

I can't see any extra ' so I don't know what's wrong.

Topic wp-title title php Wordpress

Category Web


Those look like smart apostrophes to me. They have a curve on theme. Try:

<title><?php wp_title(' | ', 'echo', 'right'); ?> - <?php bloginfo('name'); ?></title>

Otherwise post what you have around that php section too.

About

Geeks Mental is a community that publishes articles and tutorials about Web, Android, Data Science, new techniques and Linux security.