Created
April 2, 2019 16:48
-
-
Save wbxpress/f5ae145e97ee98fa55bc90541566dfa6 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
<?php | |
/** | |
* Homepage Template. | |
*/ | |
add_filter( 'genesis_attr_site-inner', 'be_site_inner_attr' ); | |
/** | |
* Adds attributes from 'entry', since this replaces the main entry. | |
* | |
* @author Bill Erickson | |
* @link http://www.billerickson.net/full-width-landing-pages-in-genesis/ | |
* | |
* @param array $attributes Existing attributes. | |
* @return array Amended attributes. | |
*/ | |
function be_site_inner_attr( $attributes ) { | |
// Add a class of 'full' for styling this .site-inner differently. | |
$attributes['class'] .= ' full'; | |
// Add an id of 'genesis-content' for accessible skip links. | |
$attributes['id'] = 'genesis-content'; | |
// Add the attributes from .entry, since this replaces the main entry. | |
$attributes = wp_parse_args( $attributes, genesis_attributes_entry( array() ) ); | |
return $attributes; | |
} | |
// Displays header. | |
get_header(); | |
// Displays front-page widget areas. | |
for ( $i = 1; $i <= 4; $i++ ) { | |
genesis_widget_area( "front-page-{$i}", array( | |
'before' => '<div class="front-page-' . $i . ' widget-area"><div class="wrap">', | |
'after' => '</div></div>', | |
) ); | |
} | |
// Displays Footer. | |
get_footer(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment