WordPress.org

Forums

Code to add tagline to title (4 posts)

  1. stagedinburgh
    Member
    Posted 4 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
    Member
    Posted 4 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
    Volunteer Moderator
    Posted 4 years ago #

    http://perishablepress.com/press/2008/07/21/how-to-generate-perfect-wordpress-title-tags-without-a-plugin/

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

  4. richarduk
    Member
    Posted 4 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

Tags