-
Notifications
You must be signed in to change notification settings - Fork 0
/
front-page.php
53 lines (44 loc) · 1.25 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
<?php
global $pw;
global $post;
$home_options = pw_get_option( array( 'option_name' => PW_OPTIONS_THEME, 'key' => 'home' ) );
$wp_page_template = get_post_meta( $post->ID, '_wp_page_template', true );
pw_header();
/**
* SLIDER
*/
if( _get( $home_options, 'slider.show_slider' ) ){
include locate_template( 'views/theme/slider-home.php' );
}
$show_on_front = get_option( 'show_on_front' );
/**
* POSTS FEED
*/
if( $show_on_front == 'posts' || is_home() || $wp_page_template === 'posts.php' ){
if( _get( $home_options, 'feed.custom.use_custom_feed' ) ){
$primary_content = pw_ob_include_template(
'views/archive/feed-home-custom.php',
_get( $home_options, 'feed.custom' )
);
}
else{
$primary_content = pw_ob_include_template('views/archive/feed-posts.php');
}
pw_print_layout( array( 'content' => $primary_content ) );
}
/**
* PAGE
*/
else if( $show_on_front == 'page' ){
// If Blog page is selected
if( $wp_page_template === 'blog.php' ){
$primary_content = pw_ob_include_template( 'views/archive/feed-blog-page.php' );
pw_print_layout( array( 'content' => $primary_content ) );
}
// Otherwise show the page
else
include locate_template('single-content.php');
}
pw_footer();
?>
<!-- Generated in <?php timer_stop(1); ?> seconds... -->