Created
December 30, 2015 00:14
-
-
Save QROkes/a83f145ee25890575cfe to your computer and use it in GitHub Desktop.
Full width landing pages (Wordpress & Genesis Framework)
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 | |
// 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