-
Notifications
You must be signed in to change notification settings - Fork 0
/
home.php
50 lines (37 loc) · 1.31 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
<?php
add_action( 'genesis_meta', 'minimum_home_genesis_meta' );
/**
* Add widget support for homepage. If no widgets active, display the default loop.
*
*/
function minimum_home_genesis_meta() {
if ( is_active_sidebar( 'welcome' ) || is_active_sidebar( 'featured' ) || is_active_sidebar( 'portfolio' ) ) {
remove_action( 'genesis_loop', 'genesis_do_loop' );
add_action( 'genesis_loop', 'minimum_home_loop_helper' );
//add_filter( 'genesis_pre_get_option_site_layout', '__genesis_return_full_width_content' );
}
}
/**
* Display widget content for "featured", "welcome" and "portfolio" sections.
* Please note that the Portfolio section below, which is Home Right for Ncem,
* us embedded inside the Featured widget section so that the latter will text wrap
* around the former.
*/
function minimum_home_loop_helper() {
if ( is_active_sidebar( 'welcome' ) ) {
echo '<div class="welcome">';
dynamic_sidebar( 'welcome' );
echo '</div><!-- end .welcome -->';
}
if ( is_active_sidebar( 'featured' ) ) {
echo '<div class="featured">';
if ( is_active_sidebar( 'portfolio' ) ) {
echo '<div class="portfolio">';
dynamic_sidebar( 'portfolio' );
echo '</div><!-- end .portfolio -->';
}
dynamic_sidebar( 'featured' );
echo '</div><!-- end .featured -->';
}
}
genesis();