Last active
December 19, 2017 04:19
-
-
Save cre8tivediva/c4e0be82ea64ba89299a571bbedf1643 to your computer and use it in GitHub Desktop.
Custom Landing Page for Swank Child Theme
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 | |
/** | |
* Custom Landing Page for the Swank Child Theme | |
* | |
* This file adds the landing page template to the Swank Child Theme. | |
* | |
* Template Name: Landing | |
* | |
* @package Custom Landing Page for Swank | |
* @author Anita Carter | |
* @license GPL-2.0+ | |
* @link http://www.cre8tivediva.com/ | |
*/ | |
// Add landing page body class to the head. | |
add_filter( 'body_class', 'swank_add_body_class' ); | |
function swank_add_body_class( $classes ) { | |
$classes[] = 'landing-page'; | |
return $classes; | |
} | |
// Force full width content layout. | |
add_filter( 'genesis_site_layout', '__genesis_return_full_width_content' ); | |
// Remove site header elements. | |
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 navigation. | |
remove_theme_support( 'genesis-menus' ); | |
// Remove top bar. | |
remove_action( 'genesis_before_header', 'swank_top_bar' ); | |
// Remove breadcrumbs. | |
remove_action( 'genesis_before_loop', 'genesis_do_breadcrumbs' ); | |
// Remove footer widgets. | |
remove_action( 'genesis_before_footer', 'genesis_footer_widget_areas' ); | |
// Remove site footer elements. | |
remove_action( 'genesis_footer', 'genesis_footer_markup_open', 5 ); | |
remove_action( 'genesis_footer', 'genesis_do_footer' ); | |
remove_action( 'genesis_footer', 'genesis_footer_markup_close', 15 ); | |
// Run the Genesis loop. | |
genesis(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment