Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Create a landing page template on Genesis Framework
<?php
/*
Template Name: Landing Page
*/
// Add custom body class to the head
add_filter( 'body_class', 'add_body_class' );
function add_body_class( $classes ) {
$classes[] = 'landing-page';
return $classes;
}
// Force full width content layout
add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_full_width_content' );
// Remove header
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_action( 'genesis_after_header', 'genesis_do_nav' );
remove_action( 'genesis_after_header', 'genesis_do_subnav' );
// Remove breadcrumbs
remove_action( 'genesis_before_loop', 'genesis_do_breadcrumbs');
// Remove footer widgets
remove_action( 'genesis_before_footer', 'genesis_footer_widget_areas' );
// Remove footer
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 );
genesis();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment