The title is displayed before my image and is not styled. How to fix it?
$tytul = wp_title();
echo '<img class="icon" src="http://site.pl/site/icon.png" /><h2>'.$tytul.'</h2>';
The title is displayed before my image and is not styled. How to fix it?
$tytul = wp_title();
echo '<img class="icon" src="http://site.pl/site/icon.png" /><h2>'.$tytul.'</h2>';
wp_title()
will print the content itself, not return it, soecho wp_title()
wont give you anything from the echo, but will print the title. If you usevar_dump(wp_title())
, you will see the title, then the result isNULL
. What you want is: