-
Notifications
You must be signed in to change notification settings - Fork 0
/
front-page.php
135 lines (119 loc) · 2.39 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
<?php
get_header('home');
?>
<main>
<?php
/*
--avdelningar
nästa läger (kalender)
senaste nyheten (post)
*/
$args = array(
'post_type' => 'post',
'posts_per_page' => get_option('posts'),
//'posts_per_page' => 2,
'ignore_sticky_posts' => true,
//'post_in' => get_option( 'sticky_posts' ),
);
$news = new WP_Query( $args );
$args = array(
'post_type' => 'front_page',
'posts_per_page' => (4 - get_option('posts')),
//'post_in' => get_option( 'sticky_posts' ),
);
$query = new WP_Query( $args );
//echo '<pre>' . var_export($news, true) . '</pre>';
?>
<div class="frontpageNotes nr-<?php echo count($query->posts) + count($news->posts); ?>" >
<?php
?>
<?php
if ( $news->have_posts() ) {
while ( $news->have_posts() ) {
$news->the_post();
get_template_part( 'inc/post_excerpts', 'the_post_excerpts' );
/*
?>
<div class="news post" id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<a href="<?php the_permalink()?>">
<?php
echo "<h2>";
the_title();
echo "</h2>";
the_content();
?>
</a>
<?php
if(has_post_thumbnail()){
the_post_thumbnail($post->ID, 'postits');
}
print_categorys($post);
?>
</div>
<?php
*/
}
}
if ( $query->have_posts() ) {
while ( $query->have_posts() ) {
$query->the_post();
get_template_part( 'inc/post', 'the_post' );
/*
?>
<div class="news" id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<?php
$link = get_the_permalink();
if(get_field('innehals_sida'))
{
$link = get_field('innehals_sida')['url'];
}
?>
<a href="<?php echo $link ?>">
<?php
echo "<h2>";
the_title();
echo "</h2>";
the_content();
?>
</a>
<?php
if(has_post_thumbnail()){
the_post_thumbnail($post->ID, 'postits');
}
print_categorys($post);
?>
</div>
<?php
*/
}
}
/*
nästa kår aktivitet (Kalender)
4 costum cards + avdelningar
Hyr bastan (Costum card)
*/
?>
</div> <!-- frontpagenotes-->
<div class="page_post" id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<?php
if ( have_posts() ) {
while ( have_posts() ) {
the_post();
echo "<h1>".get_bloginfo( 'name' )."</h1>";
the_content();
}
}
?>
</div>
<?php
if ( have_posts() ) {
while ( have_posts() ) {
the_post();
the_post_thumbnail();
}
}
?>
</main>
<?php
get_footer();
?>