-
Notifications
You must be signed in to change notification settings - Fork 0
/
front-page.php
55 lines (46 loc) · 1.68 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
<?php get_header(); ?>
<?php
if (have_posts()):
while (have_posts()): the_post();
?>
<div id="page-headings">
<h2><?php
$title = get_post_meta(get_the_ID(), 'zcraft_homepage_title', true);
echo !empty($title) ? $title : get_the_title();
?></h2>
<h3><?php
$subtitle = get_post_meta(get_the_ID(), 'zcraft_homepage_subtitle', true);
if (empty($title)) $subtitle = get_post_meta(get_the_ID(), 'subtitle', true);
echo $subtitle;
?></h3>
</div>
<div id="serveur-details">
<p class="valeurs"><?php echo get_post_meta(get_the_ID(), 'zcraft_homepage_tagline', true); ?></p>
<a href="<?php echo get_post_meta(get_the_ID(), 'zcraft_homepage_button_href', true); ?>" class="acces-candidature"><?php echo get_post_meta(get_the_ID(), 'zcraft_homepage_button', true); ?></a>
</div>
</header>
<?php
$servers_raw = trim(get_post_meta(get_the_ID(), 'zcraft_homepage_servers', true));
if (!empty($servers_raw)):
?>
<dl id="online-status" class="minecraft-style">
<?php foreach (explode("\n", $servers_raw) as $server): ?>
<?php
if (strpos($server, '|') === false)
{
$hostname = $name = $server;
}
else
{
$server = explode('|', $server);
$hostname = array_shift($server);
$name = implode('|', $server);
}
?>
<dt data-hostname="<?php echo $hostname; ?>"><?php echo $name; ?></dt><dd></dd>
<?php endforeach; ?>
</dl>
<?php endif; ?>
<?php the_content(); ?>
<?php endwhile; endif; ?>
<?php get_footer(); ?>