forked from kre8tiv/Joseph-knows-best
-
Notifications
You must be signed in to change notification settings - Fork 0
/
page-landingpage.php
executable file
·92 lines (62 loc) · 2.8 KB
/
page-landingpage.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
<?php
/*
Template Name: Landingpage
*/
?>
<?php get_header(); ?>
<?php $themen = get_post_meta( $post->ID, 'kr8mb_page_themen_id', true );
$format = get_post_meta( $post->ID, 'kr8mb_page_format_id', true ); ?>
<section id="content"><div class="inner wrap clearfix">
<?php if ( has_post_thumbnail() ) {
$thumb = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), 'full' );
$url = $thumb['0']; ?>
<div class="introbg parallax" style="background-image:url(<?php echo $url; ?>);"></div>
<div id="landing-intro" class="parallax" style="background-image:url(<?php echo $url; ?>);">
<?php } else { ?>
<div id="landing-intro" >
<?php } ?>
<div class="landing-teaser twelvecol first clearfix">
<header>
<h1 class="landing-title" itemprop="headline"><span><?php the_title(); ?><span class="hidden"><?php if( is_paged() ) { echo ' - Seite ' .$paged; }?></span></span></h1>
</header>
</div>
</div>
<div class="twelvecol first">
<?php if (!is_paged()) { ?>
<div id="main" role="main" class="clearfix">
<?php while (have_posts()): the_post(); ?>
<article id="post-<?php the_ID(); ?>" <?php post_class('clearfix'); ?> role="article" itemscope itemtype="http://schema.org/BlogPosting">
<section class="entry-content clearfix" itemprop="articleBody">
<?php the_content(); ?>
</section>
</article>
<?php endwhile; ?>
</div>
<?php } ?>
<?php if ($themen !="") { ?>
<div class="clearfix landingnews">
<?php wp_reset_query(); ?>
<?php if ( get_query_var('paged') ) { $paged = get_query_var('paged'); }
elseif ( get_query_var('page') ) { $paged = get_query_var('page'); }
else { $paged = 1; }
$postsperpage = get_option('posts_per_page');
query_posts('tag=' . $themen . '&posts_per_page='. $postsperpage .'&paged=' . $paged . '&category_name=' . $format); ?>
<?php while ( have_posts() ) : the_post(); ?>
<?php get_template_part( 'content-list', get_post_format() ); ?>
<?php endwhile; ?>
</div>
<?php if (function_exists('kr8_page_navi')) { ?>
<?php kr8_page_navi(); ?>
<?php } else { ?>
<nav class="wp-prev-next">
<ul class="clearfix">
<li class="prev-link"><?php next_posts_link(__('« Ältere Beiträge', "kr8theme")) ?></li>
<li class="next-link"><?php previous_posts_link(__('Neuere Beiträge »', "kr8theme")) ?></li>
</ul>
</nav>
<?php } ?>
<?php } ?>
</div> <!-- end #main -->
</div>
</section>
<?php get_footer(); ?>