Code to add tagline to title (4 posts)

  1. stagedinburgh
    Posted 5 years ago #

    I've been playing around with a theme called "Article Directory", was previously using Thesis.
    Thesis displayed the tagline/blog description in the browser title bar, but switching to the new theme now it is just the blog name (Plugins or not), and I want the tagline back in the tile.

    It seems the tagline is not diplayed by default in a lot of themes.
    Is there an easy line of code or 2 I can place in the header.php or another file to get back this functionality?

  2. richarduk
    Posted 5 years ago #

    From the default theme

    // Add the blog name.
    	bloginfo( 'name' );
    	// Add the blog description for the home/front page.
    	$site_description = get_bloginfo( 'description', 'display' );
    	if ( $site_description && ( is_home() || is_front_page() ) )
    		echo " | $site_description";
  3. Rev. Voodoo
    Posted 5 years ago #


    is a pretty good tutorial on adding things to the <title> which is where yuor browser gets the wording from

  4. richarduk
    Posted 5 years ago #

    <title> <?php wp_title(''); ?></title>

    The title of your page

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

    <?php bloginfo('name'); ?> is the name of your blog and is set in Admin Panel / Settings /General.

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

    <?php bloginfo('description'); ?> is set in Admin Panel / Settings /General with your description.


Topic Closed

This topic has been closed to new replies.

About this Topic