[WordPress] How to remove the space at the beginning of wp_title
In the previous article, I wrote that only the page title is displayed when posting a single article (single.php).
[Related]: [WordPress] How to display the page title and how it should be displayed
That's why I wrote it as follows.
<title><?php wp_title(''); ?></title>
However, when I looked at the source code of each article, there was a space before the [page title].
It may not be a big problem, but it's kind of disgusting, so I tried to fix it a little.
So, I rewritten it as follows.
<title><?php echo trim(wp_title('', false)); ?></title>
I was able to remove the spaces at the beginning of wp_title using the trim function.
Congratulations!