'Display Wordpress Site Title
I want to display the Title of my Wordpress Site on the single blog posts pages.
I use the following line of code in my theme's 'single blog post.php'
<h1><?php $site_title = get_bloginfo( 'name' ); ?></h1>
However it does not show anything.
Solution 1:[1]
You are not outputting anything to show. You are only assigning blog name to a variable. You need to echo the content. It should be :
<h1><?php echo get_bloginfo( 'name' ); ?></h1>
Hope this helps :)
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Sabari |
