-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathfront-page.php
90 lines (77 loc) · 2.3 KB
/
front-page.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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
<?php
/**
* *********************************************
* Front Page Template
*
* @package genesischild-mobile-first
* @author NeilGee
* @license GPL-2.0+
* @link http://wpbeaches.com/
************************************************/
// Force full-width-content layout setting.
add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_full_width_content' );
// Add Hero Widget Just to Front Page.
add_action( 'genesis_after_header','gc_optin_widget' );
add_action( 'genesis_after_header','gc_hero_widget' );
add_action( 'genesis_after_header','gc_homecontent_widget' );
// Run Custom Genesis with no inner content markup.
/**
* Remove Inner Home Page Content on a Genesis Theme
*
* @package Genesis Custom Front Page - No Inner Content
* @author Neil Gee
* @link http://wpbeaches.com/
* @copyright (c)2014, Neil Gee
**/
function gc_genesis_no_content() {
gc_genesis_header();
gc_genesis_footer();
}
// Customised Genesis Header
function gc_genesis_header() {
do_action( 'genesis_doctype' );
do_action( 'genesis_title' );
do_action( 'genesis_meta' );
wp_head(); // We need this for plugins.
?>
</head>
<?php
genesis_markup( array(
'html5' => '<body %s>',
'xhtml' => sprintf( '<body class="%s">', implode( ' ', get_body_class() ) ),
'context' => 'body',
) );
do_action( 'genesis_before' );
genesis_markup( array(
'html5' => '<div %s>',
'xhtml' => '<div id="wrap">',
'context' => 'site-container',
) );
do_action( 'genesis_before_header' );
do_action( 'genesis_header' );
do_action( 'genesis_after_header' );
// genesis_markup( array(
// 'html5' => '<div %s>',
// 'xhtml' => '<div id="inner">',
// 'context' => 'site-inner',
// ) );
// genesis_structural_wrap( 'site-inner' );
}
// Customised Genesis Footer
function gc_genesis_footer() {
// genesis_structural_wrap( 'site-inner', 'close' );
// echo '</div>'; // end .site-inner or #inner
do_action( 'genesis_before_footer' );
do_action( 'genesis_footer' );
do_action( 'genesis_after_footer' );
echo '</div>'; // End .site-container or #wrap
do_action( 'genesis_after' );
wp_footer(); // We need this for plugins.
?>
</body>
</html>
<?php
}
// Uncomment the gc_genesis_no_content() and comment out genesis() to remove the site inner div on the front page
// gc_genesis_no_content();
genesis();