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
//* Add new image sizes | |
if ( function_exists( 'add_image_size' ) ) { | |
add_image_size( 'featured', 720, 405, TRUE ); | |
add_image_size( 'archive', 340, 191, TRUE ); | |
add_image_size( 'sidebar', 100, 100, TRUE ); | |
} | |
//* Make new image sizes available in WordPress Uploader | |
add_filter('image_size_names_choose', 'my_image_sizes'); | |
function my_image_sizes($sizes) { |
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%; | |
} |
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 #genesis-responsive-slider { | |
max-width: 100%; | |
} | |
.education-pro-home .flexslider { | |
max-width: 100%; | |
} | |
.education-pro-home .flexslider .slides img { | |
width: 100%; |
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
//* 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
//* 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
//* 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
// Register and Hook Top Navigation Menu | |
add_action('genesis_before_header', 'sample_before_header_menu', 10); | |
function sample_before_header_menu() { | |
register_nav_menu( 'top', 'Top Navigation Menu' ); | |
genesis_nav_menu( array( | |
'theme_location' => 'top', | |
'menu_class' => 'menu genesis-nav-menu menu-top', | |
) ); |
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
//* 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 ); |