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
//* Add a CSS ID to main element | |
add_filter( 'genesis_attr_content', 'custom_attributes_content' ); | |
function custom_attributes_content( $attributes ) { | |
if ( is_home() || is_archive() ) { | |
$attributes['id'] = 'main-content-area'; | |
} | |
return $attributes; | |
} |
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
//* Customize the output of individual Portfolio entries | |
add_filter( 'display_posts_shortcode_output', 'sk_title_above_image', 10, 9 ); | |
function sk_title_above_image( $output, $atts, $image, $title, $date, $excerpt, $inner_wrapper, $content, $class ) { | |
$title = '<h2 itemprop="headline" class="entry-title"><a rel="bookmark" href="' . apply_filters( 'the_permalink', get_permalink() ) . '">' . apply_filters( 'the_title', get_the_title() ) . '</a></h2>'; | |
if ( $atts['image_size'] ) | |
$image = '<div class="portfolio-image"><a rel="bookmark" href="' . get_permalink() . '">' . get_the_post_thumbnail( $post->ID, $image_size ) . '</a></div> '; | |
else $image = ''; |
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 set_custom_layout( $layout_id ) { | |
if ( is_post_type_archive('ai1ec_event') || is_singular('ai1ec_event') || is_page('calendar') ) | |
return '526e727b11aca'; | |
return $layout_id; | |
} | |
add_filter( 'builder_filter_current_layout', 'set_custom_layout' ); |
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
genesis_register_sidebar( array( | |
'id' => 'after-entry', | |
'name' => __( 'After Entry', 'metro' ), | |
'description' => __( 'This is the after entry section.', 'metro' ), | |
) ); | |
//* Hooks after-entry widget area to single posts | |
add_action( 'genesis_entry_footer', 'metro_after_post' ); | |
function metro_after_post() { |
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
Using Genesis Sample child theme. | |
1) Rename logo.png in images directory to logo-notusing.png and [email protected] to [email protected] | |
2) Upload this image as logo.png in images directory: http://i.imgur.com/v2F2rjU.png | |
3) Add the following at the end of child theme's style.css: | |
body { | |
background: #222; |
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
.page .site-inner { | |
margin-top: 60px; | |
margin-top: 6rem; | |
padding: 40px 0; | |
padding: 4rem 0; | |
} | |
.minimum-landing .site-inner { | |
margin: 40px auto; | |
margin: 4rem auto; |
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
//* Add support for structural wraps | |
add_theme_support( 'genesis-structural-wraps', array( | |
'header', | |
'nav', | |
'subnav', | |
'site-inner', | |
'footer-widgets', | |
'footer', | |
'header-image' | |
) ); |
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 | |
//* Force full width content layout | |
add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_full_width_content' ); | |
remove_action( 'genesis_loop', 'genesis_do_loop' ); | |
add_action( 'genesis_loop', 'custom_do_loop' ); | |
function custom_do_loop() { ?> |
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 | |
remove_action( 'genesis_loop', 'genesis_do_loop' ); | |
add_action( 'genesis_loop', 'sk_show_subcategories_do_loop' ); | |
/** | |
* Displays a list of linked child categories on category pages | |
* | |
*/ | |
function sk_show_subcategories_do_loop() { |