Thesis Quick Tips

This post has been marked as old. The code might no longer work. Comments have been disabled as this is no longer maintained. Use the search on the right to find a newer tutorial.

There’s a lot of small code snippets I use often but don’t warrant their own post. This is where I’ll collect them. If you have any quick tips, feel free to share in the comments.

Move Nav below Header
[php]remove_action(‘thesis_hook_before_header’,’thesis_nav_menu’);
add_action(‘thesis_hook_after_header’,’thesis_nav_menu’);[/php]

Hide Header (including the header div)

[php]function no_header() {
if (is_front_page())
return false;
else
return true;
}
add_filter(‘thesis_show_header’, ‘no_header’);[/php]

Remove Default Header (but keep the header div)

[php]remove_action(‘thesis_hook_header’,’thesis_default_header’);[/php]

Hide Headline Area (page/post title)
[php]add_filter(‘thesis_show_headline_area’, ‘hide_headline’);
function hide_headline() {
if (is_front_page())
return false;
else
return true;
}[/php]

Hide Sidebars

[php]add_filter(‘thesis_show_sidebars’, ‘no_sidebars’);
function no_sidebars() {
if (is_front_page())
return false;
else
return true;
}[/php]

Hide Footer

[php]add_filter(‘thesis_show_footer’, ‘no_footer’);
function no_footer() {
if (is_front_page())
return false;
else
return true;
}[/php]

From Past Posts:

chat3 Comments

    • Bill Erickson says

      I removed the default Thesis header and rebuilt it using a left and right div. Then in CSS I floated them appropriately (view source of my site for the code).

      My header code in custom_functions.php looks something like this:


      remove_action('thesis_hook_header','thesis_default_header'); // This removes all the Thesis header code
      add_action('thesis_hook_header','custom_header'); //And I create a new header
      function custom_header() { ?>
      <div class="clearfix">
      <div class="left">
      <p id="logo"><a href="<?php bloginfo('url');?>"><?php bloginfo('name');?></a></p>
      </div>
      <div class="right">
      <?php thesis_nav_menu(); ?>
      </div>
      </div>
      <?php }