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.

Thesis Quick Tips

10-30-10 i love austin

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

remove_action('thesis_hook_before_header','thesis_nav_menu');
add_action('thesis_hook_after_header','thesis_nav_menu');

Hide Header (including the header div)

function no_header() {
if (is_front_page())
	return false;
else
	return true;
}
add_filter('thesis_show_header', 'no_header');

Remove Default Header (but keep the header div)

remove_action('thesis_hook_header','thesis_default_header');

Hide Headline Area (page/post title)

add_filter('thesis_show_headline_area', 'hide_headline');
function hide_headline() {
	if (is_front_page())
		return false;
	else
		return true;
}

Hide Sidebars

add_filter('thesis_show_sidebars', 'no_sidebars');
function no_sidebars() {
if (is_front_page())
	return false;
else
	return true;
}

Hide Footer

add_filter('thesis_show_footer', 'no_footer');
function no_footer() {
if (is_front_page())
	return false;
else
	return true;
}

From Past Posts:

Bill Erickson is a WordPress Consultant who builds custom websites using WordPress as a CMS and the Genesis framework. He contributes to the WordPress community through free themes, plugins, tutorials, and core patches. He's also a cofounder of the BIL Conference (the open analog to the TED Conference).

Looking for more great tutorials? See them all!

Comments

  1. Mohd Isa says:

    nice, but how to move nav menu like u?

    • 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 }

  2. You mean it just looks like that code,but not exactly like that..hahah.jokin man.
    Nice blog and love your photography……