Last active
December 20, 2015 16:48
-
-
Save braddalton/6163680 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 | |
/** | |
* This file adds the Custom Full Width Landing Page Template to the Metro Theme. | |
* | |
* @author Brad Dalton | |
* @package Metro | |
* @example http://wpsites.net/web-design/how-to-create-a-custom-landing-page-template-for-genesis/ | |
* @subpackage Customizations | |
* Create a new file and name it page_custom.php & add all this code to the file and upload to the metro theme folder. | |
*/ | |
/* | |
Template Name: Custom | |
*/ | |
// Add custom body class to the head | |
add_filter( 'body_class', 'metro_add_body_class' ); | |
function metro_add_body_class( $classes ) { | |
$classes[] = 'custom-landing'; | |
return $classes; | |
} | |
// Remove header, navigation, breadcrumbs, footer widgets, footer | |
add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_full_width_content' ); | |
remove_action( 'genesis_header', 'genesis_header_markup_open', 5 ); | |
remove_action( 'genesis_header', 'genesis_do_header' ); | |
remove_action( 'genesis_header', 'genesis_header_markup_close', 15 ); | |
remove_action( 'genesis_after_header', 'genesis_do_nav' ); | |
remove_action( 'genesis_before', 'genesis_do_subnav' ); | |
remove_action( 'genesis_before_loop', 'genesis_do_breadcrumbs' ); | |
remove_action( 'genesis_after', 'genesis_footer_widget_areas' ); | |
remove_action( 'genesis_after', 'genesis_footer_markup_open', 11 ); | |
remove_action( 'genesis_after', 'genesis_do_footer', 12 ); | |
remove_action( 'genesis_after', 'genesis_footer_markup_close', 13 ); | |
genesis(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment