Skip to content

Instantly share code, notes, and snippets.

@QROkes
Created December 30, 2015 00:14
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 QROkes/a83f145ee25890575cfe to your computer and use it in GitHub Desktop.
Save QROkes/a83f145ee25890575cfe to your computer and use it in GitHub Desktop.
Full width landing pages (Wordpress & Genesis Framework)
<?php
// Full Width Landing Pages in Genesis
// http://www.billerickson.net/full-width-landing-pages-in-genesis/
function qr_frontpage() {
// Insert custom sctruture/content instead of genesis() --> 'genesis_loop'
}
add_action( 'qr_content_area', 'qr_frontpage' );
// Remove 'site-inner' from structural wrap
add_theme_support( 'genesis-structural-wraps', array( 'header', 'footer-widgets', 'footer' ) );
/**
* Add attributes for site-inner element, since we're removing 'content'.
*
* @param array $attributes Existing attributes.
* @return array Amended attributes.
*/
function qr_site_inner_attr( $attributes ) {
$attributes['role'] = 'main';
$attributes['itemprop'] = 'mainContentOfPage';
return $attributes;
}
add_filter( 'genesis_attr_site-inner', 'qr_site_inner_attr' );
// Build the page
get_header();
do_action( 'qr_content_area' );
get_footer();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment