Skip to content

Instantly share code, notes, and snippets.

@ebinnion
Created April 1, 2012 00:52
Show Gist options
  • Save ebinnion/2270145 to your computer and use it in GitHub Desktop.
Save ebinnion/2270145 to your computer and use it in GitHub Desktop.
Thesis Hooks Reference
// This code will add a rotating header image to Thesis
function header_rotator() {
echo thesis_image_rotator();
}
add_action('thesis_hook_feature_box','header_rotator');
function pRecommended() {
return '<p class="recommended"><a class="button" href="http://www.wpengine.com">View Pricing for WP Engine &rarr;</a>';
}
add_shortcode('recommended', 'pRecommended');
// [recommended]
// Thesis shortcode with parameter
function sButton($atts, $content = null) {
extract(shortcode_atts(array('link' => '#'), $atts));
return '<a class="button" href="'.$link.'"><span>' . do_shortcode($content) . '</span></a>';
}
add_shortcode('button', 'sButton');
// [button link="#"]Go to Google[/button]
//This code will move the Thesis navigation below the header.
remove_action('thesis_hook_before_header' , 'thesis_nav_menu');
add_action('thesis_hook_after_header' , 'thesis_nav_menu');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment