-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsingle.php
More file actions
73 lines (71 loc) · 2 KB
/
single.php
File metadata and controls
73 lines (71 loc) · 2 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
<!DOCTYPE html>
<html <?php language_attributes(); ?>>
<head>
<meta charset="<?php bloginfo('charset'); ?>">
<link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>">
<?php wp_head(); ?>
<title>
<?php bloginfo('name'); ?>
</title>
<header>
<div class="middleColumn">
<div class="topLogo">
<img src="http://cdn.productivitytools.tech/images/PT/ProductivityTools_white_transparent_53px_2.png">
</div>
<div class="textLogo">
<h1><a href="/"><?php bloginfo('name'); ?></a></h1>
<small><?php bloginfo('description'); ?></small>
</div>
</div>
</header>
<?php if(has_nav_menu('primary')): ?>
<nav class="main-nav">
<div class="container middleColumn">
<?php $args = array('theme_location' => 'primary'); ?>
<?php wp_nav_menu($args); ?>
</div>
</nav>
<?php endif;?>
</head>
<body>
<div class="middleColumn">
<?php if(have_posts()): ?>
<?php while(have_posts()): the_post(); ?>
<article class="post">
<div>
<p class="full-article-published">Published: <?php the_date('Y.m.d'); ?></p>
<p class="full-article-category">
<?php
$categories = get_the_category();
$separator = ", ";
$output = 'Category: ';
if($categories){
foreach($categories as $category){
$output .= '<a href="'.get_category_link($category->term_id).'">'.
$category->cat_name.'</a>'.$separator;
}
}
echo trim($output, $separator);
?>
</p>
</div>
<?php if(has_post_thumbnail()): ?>
<div class="post-thumbnail">
<?php the_post_thumbnail(); ?>
</div>
<?php endif;?>
<h3 class="full-article-title">
<a href="<?php the_permalink(); ?>">
<?php the_title();?>
</a>
</h3>
<?php the_content();?>
</article>
<?php endwhile;?>
<?php else: ?>
<?php echo wpautop('Sorry, No posts were found');?>
<?php endif; ?>
</div>
<?php wp_footer(); ?>
</body>
</html>