-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtemplate-homepage.php
More file actions
55 lines (48 loc) · 1.51 KB
/
template-homepage.php
File metadata and controls
55 lines (48 loc) · 1.51 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
<?php
/**
* Template Name: Front Page
*/
?>
<?php while (have_posts()) : the_post(); ?>
<?php
$banner=wp_get_attachment_image_src( get_post_thumbnail_id(get_the_ID()), '', FALSE);
?>
<style>
.hero {
background-image: url('<?= $banner[0]; ?>');
}
</style>
<header class="hero">
<div class="hero__brand">
<a href="<?= esc_url(home_url('/')); ?>"><?php bloginfo('name'); ?></a>
</div>
<div class="wrapper wrapper--wide">
<div class="hero__text">
<h1><?php echo get_post_meta( get_the_ID(), 'welcometext', true ); ?></h1>
<div class="hero__paragr">
<?php if ( get_post_meta( get_the_ID(), 'homep', true )) : ?>
<div class="hero__paragr">
<?= wpautop(get_post_meta( get_the_ID(), 'homep', true )); ?>
</div>
<?php endif; ?>
<a href="<?php echo get_post_meta( get_the_ID(), 'buttonurl', true ); ?>" class="btn">
<?php echo get_post_meta( get_the_ID(), 'buttontext', true ); ?>
</a>
<?php if ( get_post_meta( get_the_ID(), 'circletext', true )) : ?>
<div class="hero__circle">
<span class="hero__circle__inner">
<?= get_post_meta( get_the_ID(), 'circletext', true ); ?>
</span>
</div>
<?php endif; ?>
</div>
</div>
</header>
<?php get_template_part('templates/header'); ?>
<div id="container" class="container" role="main">
<?php get_template_part('templates/section','lister'); ?>
<section class="content content--bilder">
<img src="<?= get_stylesheet_directory_uri(); ?>/assets/images/homeinterior.jpg" alt="">
</section>
</div>
<?php endwhile; ?>