Skip to content

Instantly share code, notes, and snippets.

@SiGaCode
Created July 21, 2016 17:51
Show Gist options
  • Select an option

  • Save SiGaCode/8ce059ca96a41e2bce4a4640fb7a77c5 to your computer and use it in GitHub Desktop.

Select an option

Save SiGaCode/8ce059ca96a41e2bce4a4640fb7a77c5 to your computer and use it in GitHub Desktop.
Add the home banner that is shown in the Freshly skin preview but missing in the skin (CSS was implemented, though) as a widget area to the skin functions (PHP). Goes to Dynamik Design - Skins - Freshly (or your re-named skin) - PHP. Add AFTER: /*** END CORE SKIN FUNCTIONS Below you may include additional Skin functions. ***/
/* Add in skin - CSS only if not present yet (in older versions it is) and edit to suit your needs*/
.freshly-home-banner {
background: #07B3D5;
width: 100%;
color: #FFFFFF;
font-size: 30px;
font-size: 3rem;
font-family: "Raleway", sans-serif;
font-style: italic;
float: left;
}
.freshly-home-banner .wrap {
max-width: 1140px;
margin: 0 auto;
padding: 20px;
text-align: center;
}
//* Add the home banner widget area
genesis_register_sidebar( array(
'id' => 'home-banner',
'name' => __( 'Home Banner', 'dynamik-gen' ),
'description' => __( 'This is the widget area for the Freshly home banner.', 'dynamik-gen' ),
) );
//* Hook the home-banner-area to after_header
add_action( 'genesis_after_header', 'freshly_home_banner', 15 );
function freshly_home_banner() {
//* Don´t add the widget area if it isn´t home or frontpage
if ( ! is_home() || !is_front_page() )
return;
genesis_widget_area( 'home-banner', array(
'before' => '<div class="freshly-home-banner"><div class="wrap">',
'after' => '</div></div>',
) );
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment