-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.php
More file actions
41 lines (24 loc) · 694 Bytes
/
index.php
File metadata and controls
41 lines (24 loc) · 694 Bytes
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
<?php
/*
Template Name: Index Template
*/
get_header();
$post = the_core()->get_post();
?>
<nav class="main-nav">
<?php
echo '<a class="previous" title="Previous" href="' . (isset($post->previous_url) ? $post->previous_url : '') . '"></a>' . PHP_EOL;
echo '<a class="next" title="next" href="' . (isset($post->next_url) ? $post->next_url : '') . '"></a>' . PHP_EOL;
?>
</nav>
<div id="page" class="<?php echo $post->class; ?>">
<?php
if (locate_template('single-' . $post->format . '.php') != '') { // template part exists \o/
get_template_part('single', $post->format);
} else {
get_template_part('single', 'default');
}
?>
</div>
<?php
get_footer();