Skip to content

Instantly share code, notes, and snippets.

@srikat
Last active August 29, 2015 13:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save srikat/9045925 to your computer and use it in GitHub Desktop.
Save srikat/9045925 to your computer and use it in GitHub Desktop.
Replace Tagline section with a Widget Area only on homepage in Minimum Pro. http://sridharkatakam.com/replace-tagline-section-widget-area-homepage-minimum-pro/
if ( is_home() || is_front_page() )
return;
printf( '<div %s>', genesis_attr( 'site-tagline' ) );
//* Register Home Featured Tagline widget area
genesis_register_sidebar( array(
'id' => 'home-featured-tagline',
'name' => __( 'Home Featured Tagline', 'minimum' ),
'description' => __( 'This is the home featured tagline section.', 'minimum' ),
) );
//* Add the custom featured section only on homepage
add_action( 'genesis_after_header', 'sk_home_featured_tagline' );
function sk_home_featured_tagline() {
if ( ! ( is_home() || is_front_page() ) )
return;
genesis_widget_area( 'home-featured-tagline', array(
'before' => '<div class="home-featured-tagline widget-area"><div class="wrap">',
'after' => '</div></div>',
) );
}
/* Featured widget area in place of tagline on homepage
------------------------------------------------------------ */
.home-featured-tagline {
margin-top: 600px;
background-color: #f5f5f5;
border-bottom: 1px solid #eee;
padding: 40px 0;
}
.home-featured-tagline .widget {
margin-bottom: 40px;
}
.home-featured-tagline .widget:last-child {
margin-bottom: 0;
}
@media only screen and (max-width: 1023px) {
.home-featured-tagline {
padding-left: 5%;
padding-right: 5%;
}
}
@media only screen and (max-width: 480px) {
.home-featured-tagline {
padding-left: 8%;
padding-right: 8%;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment