Home Ask Login Register

Developers Planet

Your answer is one click away!

Mr. Developer February 2016

how to show wordpress site title and tagline?

I'm trying to put site title and tagline in child theme header. I searched about it and find these two different wordpress functions get_bloginfo() and bloginfo().

get_bloginfo() doesn't showing the tagline, and bloginfo() showing both site title and tagline. Problem is that bloginfo() is removing the : and space between site title and description.

<title><?php bloginfo( 'name' ) . ' : '. bloginfo( 'description' ); ?></title>

Title: WebsiteThis is example website.

You can see there is no space between Website and This.

So is this possible that i show the site title and tagline with properly space and :?


Harsh February 2016

Try this

<title><?php echo get_bloginfo( 'name' ) . ' : '. get_bloginfo( 'description' ); ?></title>

echo get_option('blogname'); // For Site Name
echo get_option('blogdescription'); // For Tag line or description

Post Status

Asked in February 2016
Viewed 2,282 times
Voted 6
Answered 1 times


Leave an answer

Quote of the day: live life