-
Notifications
You must be signed in to change notification settings - Fork 12
/
template-frontpage.php
67 lines (55 loc) · 1.67 KB
/
template-frontpage.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
<?php
/**
*Template Name: Frontpage
*
*
* @package Screenr
*/
get_header(); ?>
<div id="content" class="site-content">
<main id="main" class="site-main" role="main">
<?php
do_action( 'screenr_frontpage_before_section_parts' );
if ( ! has_action( 'screenr_frontpage_section_parts' ) ) {
$sections = apply_filters (
'screenr_frontpage_sections_order',
array(
'slider',
'features',
'about',
'videolightbox',
'gallery',
'services',
'clients',
'counter',
'news',
'contact'
)
);
foreach ( $sections as $section ){
// If section not disable
if ( ! get_theme_mod( $section.'_disable' ) ) {
/**
* Hook before section
*/
do_action('screenr_before_section_' . $section);
do_action('screenr_before_section_part', $section);
/**
* Load section template part
*/
get_template_part('section-parts/section', $section);
/**
* Hook after section
*/
do_action('screenr_after_section_part', $section);
do_action('screenr_after_section_' . $section);
}
}
} else {
do_action( 'screenr_frontpage_section_parts' );
}
do_action( 'screenr_frontpage_after_section_parts' );
?>
</main><!-- #main -->
</div><!-- #content -->
<?php get_footer(); ?>