-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathpage_landing.php
55 lines (47 loc) · 1.88 KB
/
page_landing.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<?php
/**
* Template Name: Landing
*
* This file adds a Landing page template to Utility Pro.
*
* @package CDils\UtilityPro
* @link http://www.carriedils.com/utility-pro
* @author Carrie Dils
* @copyright Copyright (c) 2015, Carrie Dils
* @license GPL-2.0+
*/
declare( strict_types = 1 );
namespace CDils\UtilityPro;
add_action( 'body_class', __NAMESPACE__ . '\\add_landing_page_body_class' );
/**
* Add custom body class to landing page.
*
* @since 1.1.0
* @since 2.0.0 Renamed from utility_add_body_class() to add_landing_page_body_class().
*
* @param array $classes Existing body classes.
* @return array Amended body classes.
*/
function add_landing_page_body_class( array $classes ) : array {
$classes[] = 'utility-landing';
return $classes;
}
// Full width layout.
add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_full_width_content' );
// Remove default Genesis 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_action( 'genesis_after_header', 'genesis_do_nav' );
remove_action( 'genesis_before_loop', 'genesis_do_breadcrumbs' );
remove_action( 'genesis_entry_header', 'genesis_entry_header_markup_open', 5 );
remove_action( 'genesis_entry_header', 'genesis_entry_header_markup_close', 15 );
remove_action( 'genesis_before_footer', 'genesis_footer_widget_areas' );
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 );
// Remove elements specific to Utility Pro.
remove_action( 'genesis_before_header', __NAMESPACE__ . '\\add_bar' );
remove_action( 'genesis_before_footer', __NAMESPACE__ . '\\do_footer_nav' );
// Run the Genesis loop.
\genesis();