-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
58 lines (49 loc) · 1.51 KB
/
index.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
<?php
global $theme, $wp_query, $frontpage, $post;
get_header();
$meta = $theme->metaToData($post->ID);
$isFrontpage = true;
if (!isset($frontpage) || empty($frontpage)) {
$isFrontpage = false;
}
$fullpage = !empty($meta['hide_widgets']) && !empty($meta['hide_submenu']);
?>
<?php if (has_post_thumbnail($post->ID)): ?>
<div class="featured-image">
<?php echo get_the_post_thumbnail($post->ID, 'full'); ?>
</div>
<?php endif; ?>
<?php if (!$isFrontpage): ?>
<header id="content-title">
<h1><?php wp_title(false); ?></h1>
</header>
<?php endif; ?>
<section id="content" role="main" <?php if ($fullpage) { echo 'class="full"'; } ?>>
<?php if (have_posts()):
while (have_posts()) {
the_post();
$sub = get_post_type();
get_template_part('content', $sub);
}
$theme->set('wp_rewrite', $wp_rewrite);
$theme->set('wp_query', $wp_query);
echo $theme->render('pagination');
else: ?>
<article id="post-0" class="post no-results not-found">
<header>
<h1><?php _e('Nothing Found', 'rockharbor'); ?></h1>
</header>
<div class="entry-content">
<p><?php _e('Apologies, but no results were found for the requested archive. Perhaps searching will help find a related post.', 'rockharbor'); ?></p>
<?php get_search_form(); ?>
</div>
</article>
<?php endif; ?>
</section>
<section id="sidebar" role="complementary" class="clearfix">
<?php
dynamic_sidebar('sidebar' . ($isFrontpage ? '-frontpage' : null));
?>
</section>
<?php
get_footer();