-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.php
99 lines (88 loc) · 2.33 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
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
93
94
95
96
97
98
99
<?php
get_header();
?>
<div class="container">
<div class="posts">
<?php
$postCount = 1;
if ( have_posts() ) : while ( have_posts() ) : the_post();
?>
<div class="post-details">
<h1>
<a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
</h1>
<p class="highlight">
<?php the_author();?> - <?php the_date(); ?> - <?php the_time(); ?>
</p>
</div>
<div class="post">
<?php
$pagename = get_query_var('pagename');
if ($pagename == "firewall" || $pagename == "gluster")
{
$filename = get_template_directory() . "/page-files/" . $pagename . ".html";
echo file_get_contents($filename);
}
else {
the_content();
}
?>
</div>
<?php if (!is_single()): ?>
<div class="post-commentnumber">
<a class="commentnumber" href="<?php echo get_permalink(); ?>#disqus_thread" data-disqus-identifier="<?php echo get_the_ID(); ?> <?php echo home_url(); ?>/?p=<?php echo get_the_ID(); ?>">0 Comments</a>
</div>
<?php else: ?>
<div class="comments">
<?php
if ( comments_open() || get_comments_number() ) :
comments_template();
endif;
?>
</div>
<?php if (is_single()): ?>
<div class="previous">
<div class="link-btn"><?php previous_post_link('%link', 'Previous: %title'); ?></div>
</div>
<div class="next">
<div class="link-btn"><?php next_post_link('%link', 'Next: %title'); ?></div>
</div>
<?php else: ?>
<div class="previous">
<div class="link-btn"><?php previous_posts_link('Newer'); ?></div>
</div>
<div class="next">
<div class="link-btn"><?php next_posts_link('Older'); ?></div>
</div>
<?php endif; ?>
<?php endif; ?>
<?php
if ($postCount != sizeof($posts)) {
?><div class="post-spacer"> </div><?php
}
else {
?><div class="post-end"> </div><?php
}
$postCount++;
endwhile;
else:
?>
<div class="post">
<h1>404</h1>
<p class="highlight"><?php _e('Post not found.'); ?></highlight>
</div>
<?php
endif;
?>
</div>
<div class="widgets">
<?php if ( is_active_sidebar( 'navi_widget' ) ) : ?>
<div id="primary-sidebar" class="primary-sidebar widget-area" role="complementary">
<?php dynamic_sidebar( 'navi_widget' ); ?>
</div><!-- #primary-sidebar -->
<?php endif; ?>
</div>
</div>
<?php
get_footer();
?>