Skip to content

Instantly share code, notes, and snippets.

@cre8tivediva
Created October 8, 2020 18:40
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 cre8tivediva/7cf9de591c21840004bc1e3772e7d599 to your computer and use it in GitHub Desktop.
Save cre8tivediva/7cf9de591c21840004bc1e3772e7d599 to your computer and use it in GitHub Desktop.
Custom Landing Page for Simply Pro Child Theme which was not included in original file
<?php
/**
* Custom Simply Pro Landing Page
*
* This file adds the custom landing page template to the Simply Pro Theme.
*
* Template Name: Landing
*
* @package Simply Pro
* @author Cre8tive Diva
* @license GPL-2.0+
* @link http://cre8tivediva.com
*/
// Add landing body class to the head.
add_filter( 'body_class', 'simply_pro_add_body_class' );
function simply_pro_add_body_class( $classes ) {
$classes[] = 'simply-pro-landing';
return $classes;
}
// Remove Skip Links.
remove_action ( 'genesis_before_header', 'genesis_skip_links', 5 );
// Dequeue Skip Links Script.
add_action( 'wp_enqueue_scripts', 'metro_dequeue_skip_links' );
function metro_dequeue_skip_links() {
wp_dequeue_script( 'skip-links' );
}
// 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 breadcrumbs.
remove_action( 'genesis_before_loop', 'genesis_do_breadcrumbs' );
// Remove site footer elements.
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 );
//* Remove site footer widgets
remove_action( 'genesis_before_footer', 'genesis_footer_widget_areas' );
// Run the Genesis loop.
genesis();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment