-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathloop.php
More file actions
96 lines (90 loc) · 2.32 KB
/
Copy pathloop.php
File metadata and controls
96 lines (90 loc) · 2.32 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
<?php if( have_posts() ) : while( have_posts() ) : the_post(); ?>
<section <?php post_class(); ?> id="post-<?php the_ID(); ?>">
<article class="the_content">
<?php
// adds thumbnails for posts.
if(has_post_thumbnail()) {
the_post_thumbnail('thumbnail');
}
// adding post formats
if(has_post_format('aside'))
{
echo the_content();
}
elseif(has_post_format('chat'))
{
echo '<h3 class="title">';
echo the_title();
echo '</h3>';
echo the_content();
}
elseif(has_post_format('gallery'))
{
echo '<h3 class="title">';
echo the_title();
echo '</h3>';
echo the_content();
}
elseif(has_post_format('image'))
{
echo '<h3 class="title">';
echo the_title();
echo '</h3>';
echo the_post_thumbnail('image-format');
echo the_content();
}
elseif(has_post_format('link'))
{
echo '<h3 class="title">';
echo the_title();
echo '</h3>';
echo the_content();
}
elseif(has_post_format('quote'))
{
echo the_content();
}
elseif(has_post_format('status'))
{
echo the_content();
}
elseif(has_post_format('video'))
{
echo '<h3 class="title">';
echo the_title();
echo '</h3>';
echo the_content();
}
elseif(has_post_format('audio'))
{
echo '<h3 class="title">';
echo the_title();
echo '</h3>';
echo the_content();
}
else {
// if no other post types are present,
// displays standard post type
echo '<h3 class="title"><a href="';
echo the_permalink();
echo ' "> ';
echo the_title();
echo '</a></h3>';
echo the_excerpt();
}
// links from this loop will lead all to single.php template
// us get_template_part('content', get_post_format());
// to make custom post format templates.
?>
</article>
<p class="byline">Posted by: <?php the_author(); ?></p>
<p class="dated">Posted on: <?php echo get_the_date(); ?>, at <?php echo get_the_time(); ?> in <?php the_category(', '); ?></p>
</section>
<?php endwhile; ?><!-- end loop -->
<?php
next_posts_link('« Previous Entries');
previous_posts_link('Next Entries «');
else : ?>
<p>Not Found</p>
<p>sorry blah blah blah, whatever you're looking for doesn't exist</p>
<?php endif; ?>