Created
December 17, 2013 20:27
-
-
Save derekperkins/8012002 to your computer and use it in GitHub Desktop.
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
<?php | |
//* Start the engine | |
require_once( get_template_directory() . '/lib/init.php' ); | |
//* Add HTML5 markup structure | |
add_theme_support( 'html5' ); | |
// Deregisters local jQuery and loads Google CDN version | |
add_action('wp_enqueue_scripts', 'seo_scripts'); | |
add_filter( 'genesis_seo_title', 'seo_site_title', 10, 3 ); | |
// Remove Edit link | |
add_filter( 'edit_post_link', '__return_false' ); | |
add_theme_support( 'genesis-structural-wraps', array( 'header', 'nav', 'subnav', 'footer-widgets', 'footer' ) ); | |
//* Enqueue Open Sans Google font | |
add_action( 'wp_enqueue_scripts', 'genesis_sample_google_fonts' ); | |
function genesis_sample_google_fonts() { | |
wp_enqueue_style( 'google-font', '//fonts.googleapis.com/css?family=Open+Sans:300,400,700', array(), PARENT_THEME_VERSION ); | |
} | |
//* Add HTML5 markup structure | |
add_theme_support( 'html5' ); | |
//* Add viewport meta tag for mobile browsers | |
add_theme_support( 'genesis-responsive-viewport' ); | |
// Add support for custom header | |
add_theme_support( 'genesis-custom-header', array( | |
'width' => 360, | |
'height' => 164 | |
) ); | |
// Add new image sizes | |
add_image_size( 'featured-img', 730, 420, TRUE ); | |
add_image_size( 'featured-page', 341, 173, TRUE ); | |
add_image_size( 'portfolio-thumbnail', 264, 200, TRUE ); | |
// Reposition the Secondary Navigation | |
remove_action( 'genesis_after_header', 'genesis_do_subnav' ) ; | |
add_action( 'genesis_before_header', 'genesis_do_subnav' ); | |
// Before Header Wrap | |
add_action( 'genesis_before_header', 'before_header_wrap' ); | |
function before_header_wrap() { | |
echo '<div class="head-wrap">'; | |
} | |
// Reposition the Primary Navigation | |
remove_action( 'genesis_after_header', 'genesis_do_nav' ) ; | |
add_action( 'genesis_after_header', 'genesis_do_nav' ); | |
// After Header Wrap | |
add_action( 'genesis_after_header', 'after_header_wrap' ); | |
function after_header_wrap() { | |
echo '</div>'; | |
} | |
// Customize search form input box text | |
add_filter( 'genesis_search_text', 'custom_search_text' ); | |
function custom_search_text($text) { | |
return esc_attr( 'Search...' ); | |
} | |
//* Add support for 3-column footer widgets | |
add_theme_support( 'genesis-footer-widgets', 3 ); | |
function seo_scripts() { | |
// wp_enqueue_style('fancybox', '//cdnjs.cloudflare.com/ajax/libs/fancybox/2.1.5/jquery.fancybox.min.css'); | |
wp_deregister_script( 'jquery' ); | |
wp_register_script( 'jquery', 'http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js'); | |
wp_enqueue_script( 'jquery' ); | |
// wp_register_script( 'jquery-seo', 'http://www.seo.com/wp-content/themes/seo-fresh/js/seo.jquery.js', array('jquery') ); | |
// wp_enqueue_script( 'jquery-seo' ); | |
// wp_register_script( 'fancybox', '//cdnjs.cloudflare.com/ajax/libs/fancybox/2.1.5/jquery.fancybox.min.js', array('jquery') ); | |
// wp_enqueue_script( 'fancybox' ); | |
} | |
function seo_site_title( $title, $inside, $wrap ) { | |
?> | |
<div itemscope itemtype="http://schema.org/Organization"> | |
<a itemprop="url" href="http://telesight.staging.wpengine.com/"> | |
<img itemprop="logo" src="http://telesight.staging.wpengine.com/wp-content/themes/telesight/images/telesight_logo.png" /> | |
</a> | |
</div> | |
<?php | |
} | |
add_filter('wp_nav_menu_items','genesis_search_nav_menu', 10, 2); | |
function genesis_search_nav_menu( $menu, $args ) { | |
if ( 'top-right' != $args->menu->slug ) | |
return $menu; | |
$menu .= sprintf( '<li class="ts-search menu-item">%s</li>', __( genesis_search_form( $echo ) ) ); | |
return $menu; | |
} | |
add_action('genesis_before_content_sidebar_wrap', 'ts_hero'); | |
function ts_hero() { ?> | |
<div class="slider"><div id="ts-hero" class="wrap"> | |
<img src="http://www.telesight.com/media/335/hero_graphic.png"> | |
</div></div> | |
<div class="wrap"> | |
<?php | |
} | |
add_action('genesis_after_content_sidebar_wrap', 'ts_close_wrap', 10000); | |
function ts_close_wrap() { ?> | |
</div> | |
<?php | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment