Created
December 16, 2013 08:26
-
-
Save srikat/7983859 to your computer and use it in GitHub Desktop.
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_register_sidebar( array( | |
'id' => 'below-home-featured', | |
'name' => __( 'Below Home Featured', 'outreach' ), | |
'description' => __( 'This is below the home featured section.', 'outreach' ) | |
) ); |
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
if ( is_active_sidebar( 'home-featured' ) || is_active_sidebar( 'below-home-featured' ) || is_active_sidebar( 'home-1' ) || is_active_sidebar( 'home-2' ) || is_active_sidebar( 'home-3' ) || is_active_sidebar( 'home-4' ) ) { |
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_action( 'genesis_before_footer', 'outreach_below_home_featured', 2 ); /* To show below Home Featured */ | |
// add_action( 'genesis_before_footer', 'outreach_below_home_featured', 6 ); /* To show below Sub Footer */ |
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 outreach_below_home_featured() { | |
if ( is_active_sidebar( 'below-home-featured' ) ) { | |
remove_action( 'genesis_post_content', 'genesis_do_post_image' ); | |
genesis_widget_area( 'below-home-featured', array( | |
'before' => '<div class="below-home-featured widget-area"><div class="wrap">', | |
'after' => '</div></div>' | |
) ); | |
} | |
} |
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
.slide-image img { | |
width: 100%; | |
} | |
.below-home-featured { | |
padding: 40px 0; | |
overflow: hidden; | |
} | |
.below-home-featured .featured-content .entry:nth-of-type(3n+0), | |
.below-home-featured .featured-content .entry:nth-of-type(3n+1), | |
.below-home-featured .featured-content .entry:nth-of-type(3n+2) { | |
width: 22.169811320755%; /* 235px / 1060px */ | |
} | |
.below-home-featured .featured-content .entry:nth-of-type(4n+1), | |
.below-home-featured .featured-content .entry:nth-of-type(3n+2), | |
.below-home-featured .featured-content .entry:nth-of-type(3n+0) { | |
float: left; | |
} | |
.below-home-featured .featured-content .entry:nth-of-type(4n+0) { | |
float: right; | |
} | |
.below-home-featured .featured-content .entry:nth-of-type(4n+1), | |
.below-home-featured .featured-content .entry:nth-of-type(3n+2) { | |
margin-right: 3.77358490566%; /* 40px / 1060px */ | |
} | |
.below-home-featured h4.widget-title { | |
color: #333; | |
margin-bottom: 20px; | |
} | |
.below-home-featured .featured-content img { | |
-moz-box-shadow: 0 0 3px #999; | |
-webkit-box-shadow: 0 0 3px #999; | |
box-shadow: 0 0 3px #999; | |
margin: 0 0 10px; | |
padding: 10px; | |
} | |
.below-home-featured .featured-content img:hover { | |
-moz-box-shadow: 0 0 3px #333; | |
-webkit-box-shadow: 0 0 3px #333; | |
box-shadow: 0 0 3px #333; | |
} | |
.below-home-featured .featured-content h2, .below-home-featured .featured-content h2 a { | |
font-size: 17px; | |
} | |
@media only screen and (max-width: 1200px) { | |
.below-home-featured .featured-content img { | |
-moz-box-shadow: none; | |
-webkit-box-shadow: none; | |
box-shadow: none; | |
padding: 0; | |
} | |
} | |
@media only screen and (max-width: 1023px) { | |
.below-home-featured .featured-content .entry:nth-of-type(3n+0), | |
.below-home-featured .featured-content .entry:nth-of-type(3n+1), | |
.below-home-featured .featured-content .entry:nth-of-type(3n+2) { | |
-moz-box-sizing: border-box; | |
-webkit-box-sizing: border-box; | |
box-sizing: border-box; | |
float: left; | |
margin: 0; | |
padding: 10px; | |
text-align: center; | |
width: 50%; | |
} | |
.below-home-featured .featured-content .widget-wrap { | |
padding-left: 40px; | |
padding-right: 40px; | |
} | |
} | |
@media only screen and (max-width: 600px) { | |
.below-home-featured .featured-content .entry:nth-of-type(3n+0), | |
.below-home-featured .featured-content .entry:nth-of-type(3n+1), | |
.below-home-featured .featured-content .entry:nth-of-type(3n+2) { | |
padding: 10px; | |
width: 100%; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment