forked from ColorlibHQ/pixova-lite
-
Notifications
You must be signed in to change notification settings - Fork 0
/
front-page.php
137 lines (120 loc) · 4.19 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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
<?php
get_header();
?>
<?php
if ( 'posts' == get_option( 'show_on_front' ) ) {
?>
<div class="container">
<div class="row">
<section class="has-padding">
<div class="col-lg-8 col-md-8 col-sm-8 col-xs-12">
<?php
if ( have_posts() ) {
while ( have_posts() ) {
the_post();
?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<div class="pixova-date"></div><!--/.pixova-date-->
<header class="entry-header">
<?php the_title( sprintf( '<h2 class="entry-title"><a href="%s" rel="bookmark">', esc_url( get_permalink() ) ), '</a></h2>' ); ?>
</header><!-- .entry-header -->
<?php if ( has_post_thumbnail() ) { ?>
<aside class="entry-featured-image">
<?php echo get_the_post_thumbnail( $post->ID, 'pixova-lite-featured-blog-image' ); ?>
</aside><!--/.entry-featured-image-->
<?php } ?>
<div class="entry-meta">
<?php
printf(
// Translators: 1 is the post author, 2 is the category list.
__( '<span class="post-meta-separator"><i class="fa fa-user"></i>%1$s</span><span class="post-meta-separator"><i class="fa fa-calendar"></i>%2$s</span><span class="post-meta-separator"><i class="fa fa-comment"></i>%3$s</span><span class="post-meta-separator"><i class="fa fa-folder"></i>%4$s</span>', 'pixova-lite' ),
get_the_author_link(),
// Translators: Post time
get_the_date( get_option( 'date_format' ), $post->ID ),
// Translators: Number of com,ments
pixova_lite_get_number_of_comments( $post->ID ),
// Translators: tag list
get_the_tag_list( 'Tags: ',', ','' )
);
?>
</div><!--/.entry-meta-->
<div class="entry-content">
<?php
echo apply_filters( 'the_content', substr( get_the_content(), 0, 200 ) );
wp_link_pages(
array(
'before' => '<div class="page-links">' . __( 'Pages:', 'pixova-lite' ),
'after' => '</div>',
)
);
?>
</div><!-- .entry-content -->
<div class="clearfix"></div><!--/.clearfix-->
</article><!-- #post-## -->
<?php
}// End while().
?>
<?php
}// End if().
?>
</div><!--/.col-lg-8-->
<div class="col-lg-3 col-md-3 col-sm-3 hidden-xs pull-right">
<aside class="pixova-blog-sidebar">
<?php
if ( is_active_sidebar( 'blog-sidebar' ) ) {
dynamic_sidebar( 'blog-sidebar' );
} else {
the_widget( 'WP_Widget_Search', sprintf( 'title=%s', __( 'Search', 'pixova-lite' ) ) );
the_widget( 'WP_Widget_Calendar', sprintf( 'title=%s', __( 'Calendar', 'pixova-lite' ) ) );
}
?>
</aside> <!--/.pixova-blog-sidebar-->
</div><!--/.col-lg-3-->
<div class="pixova-custom-pagination col-lg-12">
<?php the_posts_pagination(); ?>
</div><!--/.pixova-custom-pagination-->
</section><!--/section-->
</div><!--/.row-->
</div><!--/.container-->
<?php
} // End if().
else {
$sections = pixova_get_sections_position();
$sections_args = array(
'pixova_lite_panel_intro' => array(
'check' => 'pixova_lite_intro_visibility',
'template' => 'intro',
),
'pixova_lite_panel_about' => array(
'check' => 'pixova_lite_about_visibility',
'template' => 'about',
),
'pixova_lite_panel_works' => array(
'check' => 'pixova_lite_works_visibility',
'template' => 'works',
),
'pixova_lite_panel_testimonials' => array(
'check' => 'pixova_lite_testimonials_visibility',
'template' => 'testimonials',
),
'pixova_lite_panel_news' => array(
'check' => 'pixova_lite_news_visibility',
'template' => 'news',
),
'pixova_lite_panel_team' => array(
'check' => 'pixova_lite_team_visibility',
'template' => 'team',
),
'pixova_lite_panel_contact' => array(
'check' => 'pixova_lite_contact_visibility',
'template' => 'contact',
),
);
foreach ( $sections as $section ) {
if ( get_theme_mod( $sections_args[ $section ]['check'], 1 ) ) {
get_template_part( 'sections/section', $sections_args[ $section ]['template'] );
}
}
} // else
?>
<?php get_footer(); ?>