Skip to content

Instantly share code, notes, and snippets.

@manhleo93
Created July 24, 2017 14:25
Show Gist options
  • Save manhleo93/5779513b04abb12f912c92ec96dd0b54 to your computer and use it in GitHub Desktop.
Save manhleo93/5779513b04abb12f912c92ec96dd0b54 to your computer and use it in GitHub Desktop.
<?php
// Enqueue styles
wp_enqueue_style( 'front-styles', get_stylesheet_directory_uri() . '/style-front.css', array(), CHILD_THEME_VERSION );
/**
* Add attributes for site-inner element, since we're removing 'content'.
*
* @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 the attributes from .entry, since this replaces the main entry
$attributes = wp_parse_args( $attributes, genesis_attributes_entry( array() ) );
return $attributes;
}
add_filter( 'genesis_attr_site-inner', 'be_site_inner_attr' );
// Header.
get_header();
// Content.
for ( $i = 1; $i <= 5; $i++ ) {
genesis_widget_area( "front-page-{$i}", array(
'before' => '<div class="front-page-' . $i . ' front-page-section"><div class="wrap">',
'after' => '</div></div>',
) );
}
// Comments.
// genesis_get_comments_template();
// Footer.
get_footer();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment