forked from ColorlibHQ/unapp
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpage.php
executable file
·61 lines (58 loc) · 1.92 KB
/
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
<?php
/**
* The template for displaying pages
*
* @package unapp
*/
get_header();
unapp_page_header();
?>
<?php
$layout = Unapp_Helper::get_layout( 'unapp_page_layout' );
if( class_exists( 'Epsilon_Page_Generator' ) ){
$unapp_fp = Epsilon_Page_Generator::get_instance( 'unapp_frontpage_sections_' . get_the_ID(), get_the_ID() );
}
if ( ! empty( $unapp_fp->sections ) ) :
$unapp_fp->generate_output();
else :
?>
<div class="colorlib-blog">
<div class="container">
<div class="row">
<?php if ( 'left-sidebar' === $layout['type'] && is_active_sidebar( 'sidebar-1' ) ) { ?>
<div class="col-sm-<?php echo esc_attr( $layout['columns']['sidebar']['span'] ); ?> animate-box">
<?php get_sidebar(); ?>
</div>
<?php } ?>
<div class="<?php echo ( 1 === $layout['columnsCount'] && ! is_active_sidebar( 'sidebar' ) ) ? 'col-sm-12' : 'col-sm-' . esc_attr( $layout['columns']['content']['span'] ); ?> animate-box">
<!-- MAIN CONTENT -->
<div class="page-content">
<?php
while (have_posts()) : the_post();
get_template_part( 'template-parts/content', 'page' );
endwhile;
?>
</div>
<?php
wp_link_pages( array(
'before' => '<div class="page-links">' . esc_html__( 'Pages:', 'unapp' ),
'after' => '</div>',
) );
?>
<?php
if ( comments_open() || get_comments_number() ) {
comments_template();
}
?>
</div>
<?php if ( 'right-sidebar' === $layout['type'] && is_active_sidebar( 'sidebar-1' ) ) { ?>
<div class="col-sm-<?php echo esc_attr( $layout['columns']['sidebar']['span'] ); ?> animate-box">
<?php get_sidebar(); ?>
</div>
<?php } ?>
</div>
</div>
</div>
<?php
endif;
get_footer();