Created
April 1, 2012 00:52
-
-
Save ebinnion/2270145 to your computer and use it in GitHub Desktop.
Thesis Hooks Reference
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function pRecommended() { | |
return '<p class="recommended"><a class="button" href="http://www.wpengine.com">View Pricing for WP Engine →</a>'; | |
} | |
add_shortcode('recommended', 'pRecommended'); | |
// [recommended] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment