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
/** | |
* Registers options with the WordPress Theme Customizer | |
* | |
*/ | |
function register_customizer_actions( $wp_customize ) { | |
$wp_customize->add_section( | |
'menu_location', | |
array( | |
'title' => 'Primary Menu Location', |
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
(function( $ ) { | |
"use strict"; | |
wp.customize( 'genesis_background_color', function( value ) { | |
value.bind( function( to ) { | |
$( 'body' ).css( 'background-color', to ); | |
} ); | |
}); |
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
wp.customize( 'primary_menu_location', function( value ) { | |
value.bind( function( to ) { | |
if ( to == 'before-header' ) { | |
$( '.nav-primary' ).detach().prependTo( '.site-container', to ); | |
} | |
if ( to == 'before-footer' ) { | |
$( '.nav-primary' ).detach().prependTo( '.site-footer', to ); | |
} |
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
//* Display the secondary navigation if page is a child of parent ID | |
add_action ('genesis_after_header', 'secondary_nav_if_child'); | |
function secondary_nav_if_child() { | |
global $post; | |
if ( $post->post_parent == '10' ) { | |
add_action( 'genesis_after_header', 'genesis_do_subnav', 30 ); |
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
//* Display the secondary navigation if page is a child or grandchild of parent ID | |
add_action ('genesis_after_header', 'secondary_nav_if_child'); | |
function secondary_nav_if_child() { | |
global $post; | |
$ancestors = get_post_ancestors($post); | |
if ( in_array( 10,$ancestors ) ) { |
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
//* Remove post date if is a sticky post | |
add_filter( 'genesis_post_info', 'prefix_post_info_filter' ); | |
function prefix_post_info_filter($post_info) { | |
if ( is_sticky() ) | |
$post_info = 'By [post_author_posts_link] · [post_comments] [post_edit]'; | |
return $post_info; | |
} |
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
//* Remove post date if is a sticky post | |
add_filter( 'genesis_post_info', 'prefix_post_info_filter' ); | |
function prefix_post_info_filter($post_info) { | |
if ( is_sticky() ) { | |
$post_info = 'By [post_author_posts_link] · [post_comments] [post_edit]'; | |
} else { | |
$post_info = '[post_date] · By [post_author_posts_link] · [post_comments] [post_edit]'; |
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
//* Hook featured image into Entry Header | |
add_action( 'genesis_entry_header', 'newsbreak_featured_photo', 15 ); | |
function newsbreak_featured_photo() { | |
$image = genesis_get_image( array( 'format' => 'html', 'size' => genesis_get_option( 'image_size' ), 'attr' => array( 'class' => 'entry-image' ) ) ); | |
if ( has_post_thumbnail() && !is_singular() ) { | |
printf( '<div class="featured-image"><a href="%s" title="%s">%s</a></div>', get_permalink(), the_title_attribute( 'echo=0' ), $image ); | |
} |
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
.genesis-nav-menu .menu-item:hover > .sub-menu { | |
left: auto; | |
opacity: 1; | |
left: 50%; | |
width: 1200px; | |
margin-left: -600px; | |
background-color: #fff; | |
} |
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
.education-pro-home .flexslider .slide-image { | |
max-height: 100%; | |
} |