Wordpress Code & Research


All things about wordpress

Thesis theme code snippets

Custom Posts & Pages
Archive page information box

remove_action( ‘thesis_hook_archive_info’, ‘thesis_default_archive_info’ );
Custom Homepage Template

remove_action( ‘thesis_hook_custom_template’, ‘thesis_custom_template_sample’ );
Default 404 Title

remove_action( ‘thesis_hook_404_title’, ‘thesis_404_title’ );
Default 404 Content

remove_action( ‘thesis_hook_404_content’, ‘thesis_404_content’ );

Custom Header

remove_action( ‘thesis_hook_header’, ‘thesis_default_header’ );
add_action( ‘thesis_hook_header’, ‘custom_header’ );
* Build custom header
* @author Greg Rickaby
* @since 1.0.0
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 Header Default Header

remove_action( ‘thesis_hook_header’, ‘thesis_default_header’ );

Nav Menu

remove_action( ‘thesis_hook_before_header’, ‘thesis_nav_menu’ );

Search Box

add_action( ‘thesis_hook_before_header’, ‘thesis_search_form’ );
Post Tags

remove_action( ‘thesis_hook_after_post’, ‘thesis_post_tags’ );
Post Navigation

remove_action( ‘thesis_hook_after_content’, ‘thesis_post_navigation’ );
Previous/next post navigation

remove_action( ‘thesis_hook_after_content’, ‘thesis_prev_next_posts’ );

Comment Link

remove_action( ‘thesis_hook_after_post’, ‘thesis_comments_link’ );
Subscribe to Comments plugin compatibility

remove_action( ‘thesis_hook_comment_form’, ‘show_subscription_checkbox’ );

Thesis Attribution (Developer license only)

remove_action( ‘thesis_hook_footer’, ‘thesis_attribution’ );
Footer scripts

remove_action( ‘thesis_hook_after_html’, ‘thesis_footer_scripts’ );
How To Use These Snippets
If you wanted to move the Thesis Nav Menu below the Header:

First, remove the Nav from the hook, “Before Header”

remove_action( ‘thesis_hook_before_header’, ‘thesis_nav_menu’ );
Now, add it back to the hook, “After Header”

add_action( ‘thesis_hook_after_header’, ‘thesis_nav_menu’ );
The final syntax in custom_functions.php would look like this:

remove_action(‘thesis_hook_before_header’, ‘thesis_nav_menu’);
add_action(‘thesis_hook_after_header’, ‘thesis_nav_menu’);


Filed under: Thesis