Created
February 2, 2011 04:55
-
-
Save chasereeves/807258 to your computer and use it in GitHub Desktop.
all the basic thesis hooks.
This file contains 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
<?php | |
// thesis_nav_menu(); | |
// thesis_content_column(); | |
//=========================================================== CUSTOM META STUFF | |
function custom_meta_stuff() { ?> | |
<?php } add_action('wp_head', 'custom_meta_stuff'); | |
//=========================================================== CUSTOM HEADER | |
remove_action('thesis_hook_header', 'thesis_default_header'); | |
function custom_header() { ?> | |
<?php } add_action('thesis_hook_header', 'custom_header'); | |
//=========================================================== ADD PAGE BODY CLASS TO PAGES | |
function custom_page_bodyclass($classes) { if ( is_page() ) { $classes[] = 'wp_page'; }; $classes[] = 'no_js'; return $classes; } | |
add_action('thesis_body_classes', 'custom_page_bodyclass'); | |
//=========================================================== MOVE NAV | |
remove_action('thesis_hook_before_header','thesis_nav_menu'); | |
add_action('thesis_hook_after_header','thesis_nav_menu'); | |
//=========================================================== RSS PROMO | |
function custom_end_post() { ?> | |
<?php } add_action('thesis_hook_after_post', 'custom_end_post'); | |
//=========================================================== CUSTOM SIDEBAR | |
function custom_sidebar() { ?> | |
<li class="widget"> | |
</li> | |
<?php } add_action('thesis_hook_before_sidebar_1', 'custom_sidebar'); | |
//========================================================== CUSTOM BYLINE CATEGORY | |
function add_to_byline() { | |
if (!is_page()) { echo ' in <span>' . get_the_category_list(',') . '</span>'; } | |
} add_action('thesis_hook_byline_item', 'add_to_byline', '99'); | |
//========================================================== CUSTOM FOOTER | |
remove_action('thesis_hook_footer', 'thesis_attribution'); | |
function custom_footer() { ?> | |
<?php } add_action('thesis_hook_footer', 'custom_footer'); | |
//========================================================== CUSTOM FOOTER SCRIPTS | |
function footer_scripts() { ?> | |
<!-- Grab Google CDN's jQuery. fall back to local if necessary --> | |
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.js"></script> | |
<script>!window.jQuery && document.write(unescape('%3Cscript src="<?php bloginfo('template_url'); ?>/custom/js/libs/jquery-1.4.2.js"%3E%3C/script%3E'))</script> | |
<!-- scripts concatenated and minified via ant build script--> | |
<script src="<?php bloginfo('template_url'); ?>/custom/js/script.js"></script> | |
<!-- end concatenated and minified scripts--> | |
<!--[if lt IE 7 ]> | |
<script src="<?php bloginfo('template_url'); ?>/custom/js/libs/dd_belatedpng.js"></script> | |
<script> DD_belatedPNG.fix('img, .png_bg'); //fix any <img> or .png_bg background-images </script> | |
<![endif]--> | |
<!-- asynchronous google analytics: mathiasbynens.be/notes/async-analytics-snippet | |
change the UA-XXXXX-X to be your site's ID --> | |
<script> | |
var _gaq = [['_setAccount', 'UA-18633863-1'], ['_trackPageview']]; | |
(function(d, t) { | |
var g = d.createElement(t), | |
s = d.getElementsByTagName(t)[0]; | |
g.async = true; | |
g.src = ('https:' == location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js'; | |
s.parentNode.insertBefore(g, s); | |
})(document, 'script'); | |
</script> | |
<?php | |
} | |
add_action('thesis_hook_after_html', 'footer_scripts'); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment