-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathfront-page.php
82 lines (63 loc) · 2.22 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
<?php
/**
* The template file of the front page.
*
* Dynamic Front Page: Sometimes called the integrated model,
* the dynamic site design features a static front page plus blog,
* however the front page is dynamic.
* It may feature a combination of static and blog content (Page and posts).
*
* @link https://codex.wordpress.org/Creating_a_Static_Front_Page#Adding_custom_query_loops_to_front-page.php
*
* @package scientific_2016
*/
get_header();
?>
<div id="primary" class="content-area">
<main id="main" class="site-main" role="main">
<?php
/* * *********** Block Newest Post *************** */
if ( have_posts() ) :
set_query_var( 'section_type', Scientific2016ContentType::Newest ); // set scetion_type, to be used in content-front-page.php
?>
<section class="block block-newest-posts clear">
<?php /* Start the Loop */ ?>
<?php while ( have_posts() ) : the_post(); ?>
<?php
get_template_part( 'template-parts/content', 'front-page-newest' );
?>
<?php endwhile; ?>
</section>
<?php endif; ?>
<?php
/* * *********** Block Articles *************** */
scientific_2016_display_front_page_posts( Scientific2016ContentType::Articles );
?>
<?php
/* * *********** Block Fast Science *************** */
scientific_2016_display_front_page_posts( Scientific2016ContentType::Fast_science );
?>
<?php
/* * *********** Block Fast Science *************** */
scientific_2016_display_front_page_posts( Scientific2016ContentType::Opinions );
?>
<?php /* * *********** Block Latest Isuues *************** */ ?>
<section class = "block block-latest-issues">
<header class = "block-title-plain">
<a href="<?php echo get_category_link( ALL_ISSUES_CATEGORY_ID ); ?> "><?php _e( 'Older issues', 'scientific-2016' ) ?></a>
</header>
<div class="issues-wrapper clear">
<?php scientific_2016_display_latest_issues( 3, false );
?>
<a class="more-issues" href="<?php echo get_category_link( ALL_ISSUES_CATEGORY_ID ); ?> ">
<?php _e( 'Older issues', 'scientific-2016' ) ?>
</a>
</div>
</section>
<?php
/* * *********** Block % most read *************** */
get_sidebar();
?>
</main><!-- #main -->
</div><!-- #primary -->
<?php get_footer(); ?>