-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathhome.php
More file actions
69 lines (68 loc) · 2.61 KB
/
home.php
File metadata and controls
69 lines (68 loc) · 2.61 KB
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
<?php //get_template_part('templates/page', 'header');
//var_dump(get_option( 'sticky_posts' ));
?>
<?php if ( !is_paged() ) : ?>
<?php
$args = array(
'posts_per_page' => 1,
'post__in' => get_option( 'sticky_posts' ),
'ignore_sticky_posts' => 1,
);
$stickyposts = new WP_Query( $args );
?>
<?php while ($stickyposts->have_posts()) : $stickyposts->the_post(); ?>
<?php setup_postdata( $post ); ?>
<article <?php post_class(); ?>>
<header class="posthead ps">
<div class="grid-container">
<div class="grid-x grid-margin-x align-center">
<div class="large-9 xxlarge-8 cell">
<div class="posthead__content">
<h1 class="posthead__title">
<?php if (is_single()): ?>
<?php the_title(); ?>
<?php else: ?>
<a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
<?php endif; ?>
</h1>
<div class="posthead__meta">
<?php get_template_part('templates/post-meta'); ?>
</div>
<div class="posthead__lead lead"><?php the_excerpt(); ?></div>
</div>
<a class="readmore readmore--large" href="<?php the_permalink(); ?>">Tovább a részletekre</a>
</div>
</div>
</div>
</header>
</article>
<?php endwhile; ?>
<?php wp_reset_postdata(); ?>
<?php if ( $stickyposts->post_count > 0 ) {
the_post();
} ?>
<?php else: ?>
<?php get_template_part( '/templates/breaking'); ?>
<?php endif; ?>
<div class="ps ps--xlight ps--bordered">
<div class="grid-container">
<div class="grid-x grid-margin-x align-center">
<div class="large-9 xxlarge-8 cell">
<div class="postgrid grid-x grid-margin-x grid-margin-y medium-up-2 large-up-2">
<?php while (have_posts()) : the_post(); ?>
<div class="cell">
<?php get_template_part('templates/postcard'); ?>
</div>
<?php endwhile; ?>
</div>
<br><br>
<nav class="pagi">
<?php
wp_reset_postdata();
teleki_foundation_pagination();
?>
</nav>
</div>
</div>
</div>
</div>