Replace Default Header Function (Logo and Tagline)

This document is deprecated! The information on this page refers to a Thesis version that is now obsolete. Please visit the Thesis Docs for current documentation.

This code (placed in custom_functions.php) will remove the default Thesis header function and replace it with an exact replica of the original:

function custom_header() { ?>
  <p id="logo"><a href="<?php bloginfo('url'); ?>"><?php bloginfo('name'); ?></a></p>
  <h1 id="tagline"><?php bloginfo('description'); ?></h1>
  <?php 
}
remove_action('thesis_hook_header', 'thesis_default_header');
add_action('thesis_hook_header', 'custom_header');

Starting with the replicated function as the base example, you could then make various modifications to the code to suit your preferences.

Place Logo and Tagline on Same Line Within H1 Tag ∞

Place the following code in custom_functions.php:

function custom_header() { ?>
  <h1 id="logo"><a href="<?php bloginfo('url'); ?>"><?php bloginfo('name'); ?></a>
  <span id="tagline"><?php bloginfo('description'); ?></span></h1>
  <?php 
}

remove_action('thesis_hook_header', 'thesis_default_header');
add_action('thesis_hook_header', 'custom_header');

Change URL of Logo Link ∞

Place the following code in custom_functions.php, and change www.example.com to your desired URL:

function custom_header() { ?>
  <p id="logo"><a href="http://www.example.com/"><?php bloginfo('name'); ?></a></p>
  <h1 id="tagline"><?php bloginfo('description'); ?></h1>
  <?php 
}
remove_action('thesis_hook_header', 'thesis_default_header');
add_action('thesis_hook_header', 'custom_header');