Skip to content

Instantly share code, notes, and snippets.

@braddalton
Last active July 24, 2017 08:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save braddalton/5737ee5b12c70a927dbc9074c921598d to your computer and use it in GitHub Desktop.
Save braddalton/5737ee5b12c70a927dbc9074c921598d to your computer and use it in GitHub Desktop.
genesis_register_sidebar( array(
'id' => 'home-top',
'name' => __( 'Home Top', 'genesis' ),
) );
add_action( 'genesis_before_content_sidebar_wrap', 'home_page_widget' );
function home_page_widget() {
if ( is_front_page() ) {
genesis_widget_area( 'home-top', array(
'before' => '<div class="home-top widget-area">',
'after' => '</div>',
) );
}
}
add_image_size( 'vertical-thumbnail', 680, 900, true );
.home-top .entry .entry-title {
font-size: 16px;
text-align: center;
}
.home-top .entry {
display: inline-block;
padding: 1%;
width: 33.33333333333%;
}
@media only screen and (max-width: 860px) {
.home-top .entry {
display: inline-block;
width: 100%;
}
// Another method
.home-top .entry {
width: 31.6239%;
float: left;
margin-left: 2.5641%;
}
.home-top .entry:nth-of-type(3n+1){
margin-left: 0;
}
.home-top .entry .entry-title {
font-size: 16px;
text-align: center;
}
@media only screen and (max-width: 860px) {
.home-top .entry {
width: 100%;
float: none;
margin: auto;
}
.home-top {
margin-bottom: 40px;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment