-
Notifications
You must be signed in to change notification settings - Fork 8
/
home.php
65 lines (41 loc) · 1.49 KB
/
home.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
<?php
add_action( 'genesis_meta', 'bit51_home_genesis_meta' );
/**
* Add widget support for homepage. If no widgets active, display the default loop.
*
*/
function bit51_home_genesis_meta() {
global $paged;
if( $paged < 1 ) {
if ( is_active_sidebar( 'intro-left' ) || is_active_sidebar( 'intro-center' ) || is_active_sidebar( 'into-right' ) ) {
add_action( 'genesis_before_content', 'bit51_home_loop_helper', 1 );
}
}
}
function bit51_home_loop_helper() {
echo '<div id="home-featured">';
if ( is_active_sidebar( 'intro-left' ) ) {
genesis_widget_area( 'intro-left', array(
'before' => '<div class="intro-left widget-area"><div class="inner">',
'after' => '<div class="clear"></div></div></div><!-- end .intro-left -->'
) );
}
if ( is_active_sidebar( 'intro-left' ) || is_active_sidebar( 'into-right' ) ) {
$centerclass = 'intro-center';
} else {
$centerclass = 'intro-full';
}
genesis_widget_area( 'intro-center', array(
'before' => '<div class="' . $centerclass . ' widget-area"><div class="inner">',
'after' => '<div class="clear"></div></div></div><!-- end .intro-center -->'
) );
if ( is_active_sidebar( 'intro-right' ) ) {
genesis_widget_area( 'intro-right', array(
'before' => '<div class="intro-right widget-area"><div class="inner">',
'after' => '<div class="clear"></div></div></div><!-- end .intro-right -->'
) );
}
echo '<div class="clear"></div>';
echo '</div>';
}
genesis();