-
Notifications
You must be signed in to change notification settings - Fork 0
/
front-page.php
80 lines (56 loc) · 1.85 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
<?php
/**
* The main home page template - front-page.php
* This template supercedes the index.php file.
* This page may be selected as a static page or simply
* run as the default template hierarchy
*
* @link https://codex.wordpress.org/Template_Hierarchy
*
* @package BP_Progenitor
*/
get_header(); ?>
<div id="primary" class="content-area">
<main id="main" class="site-main">
<?php if ( is_user_logged_in() ) : ?>
<?php if ( is_active_sidebar('homepage-block-top-loggedin') ) { ?>
<div class="block-top">
<?php dynamic_sidebar( 'homepage-block-top-loggedin' ); ?>
</div>
<?php } ?>
<?php
/*
* block 1 serves widgets only - leaving empty will let block 2 expand
* to full width and provide a column choice for layout.
* If block 1 active with widgets then layout is two row horizontal
*/
?>
<?php if ( is_active_sidebar('homepage-block-1-loggedin') ) { ?>
<div class="block-1">
<?php //get_template_part('/template-parts/home-page/home-page-activity-loop'); ?>
<?php dynamic_sidebar( 'homepage-block-1-loggedin' ); ?>
</div>
<?php }; ?>
<div class="block-2">
<?php if ( is_active_sidebar('homepage-block-2-loggedin') ) {
dynamic_sidebar( 'homepage-block-2-loggedin' );
}; ?>
<?php get_template_part('/template-parts/home-page/home-page-post-loop'); ?>
</div>
<?php ################# Loggedout frontpage elements ##################### ?>
<?php else: ?>
<div class="block-1">
<?php if ( is_active_sidebar('homepage-block-1-loggedout') ) {
dynamic_sidebar( 'homepage-block-1-loggedout' );
}; ?>
</div>
<div class="block-2">
<?php if ( is_active_sidebar('homepage-block-2-loggedout') ) {
dynamic_sidebar( 'homepage-block-2-loggedout' );
}; ?>
</div>
<?php endif; ?>
</main><!-- #main -->
</div><!-- #primary -->
<?php
get_footer();