-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsingle.php
More file actions
116 lines (62 loc) · 2.4 KB
/
single.php
File metadata and controls
116 lines (62 loc) · 2.4 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
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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
<?php get_header(); ?>
<div id="content">
<div id="inner-content">
<div id="main" role="main">
<div class="inner-wrap">
<?php
// loop starts
if ( have_posts() ) {
while ( have_posts() ) {
the_post();
?>
<article id="post-<?php the_ID(); ?>" class="post" role="article">
<header class="article-header">
<h1 class="post-title"><?php the_title(); ?></h1>
<div class="byline">
</div>
</header> <!-- end article header -->
<section class="article-content">
<?php the_content(); ?>
</section> <!-- end article-content section -->
<footer class="article-footer">
<?php
$category = get_the_category();
if($category[0]){
?>
<div class="byline">
<p>Posted by <?php the_author_link(); ?> el <?php the_time('l j \d\e F \d\e Y'); ?> under <a href="<?php get_category_link($category[0]->term_id ); ?>"><?php echo $category[0]->cat_name; ?></a>.</p>
</div>
<?php
}
comments_template( $file, $separate_comments );
?>
</footer> <!-- end article footer -->
</article> <!-- end article -->
<?php
} // end while
} // end if
else {
?>
<article id="post-not-found" class="post">
<header class="article-header">
<h1>Post not found</h1>
</header>
<section class="entry-content">
<p>Sorry, the content you requested doesn't exist or is not available at this moment.</p>
</section>
<footer class="article-footer">
</footer>
</article>
<?php
} //end else
// loop ends
?>
<div id="pagination">
<p><?php posts_nav_link(); ?></p>
</div>
</div> <!-- end #main -->
</div> <!-- end #main-wrap -->
<?php get_sidebar(); ?>
</div> <!-- end #inner-content -->
</div> <!-- end #content -->
<?php get_footer(); ?>