This repository has been archived by the owner on Sep 9, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.php
80 lines (64 loc) · 2.38 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
<?php get_header(); ?>
<?php if (is_home() || is_archive()): ?>
<h1>News</h1>
<?php endif; ?>
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<header>
<p class="kicker">
<time pubdate datetime="<?php the_time('Y-m-d'); ?>"><?php the_time('F j, Y'); ?></time>
</p>
<h1>
<?php if (is_singular()): ?>
<?php the_title(); ?>
<?php else: ?>
<a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
<?php endif; ?>
</h1>
</header>
<div class="entry">
<?php if (!is_singular()) { ?>
<?php the_excerpt(); ?>
<?php } else { ?>
<?php if(has_post_thumbnail()) : ?>
<figure class="featured-image">
<?php the_post_thumbnail('full'); ?>
<figcaption>
<?php echo get_post(get_post_thumbnail_id())->post_excerpt; ?>
</figcaption>
</figure>
<?php endif; ?>
<?php the_content(__('Read the rest of this entry »','themename')); ?>
<?php wp_link_pages(array(
'before' => '<p><strong> '.__('Pages:','themename').' </strong>',
'after' => '</p>',
'next_or_number' => 'number'));
?>
<?php if (is_single()) : ?>
<?php the_tags('<span id="tags"><strong>'.__('Tagged as:','themename').'</strong> ', ', ', '</span>'); ?>
<?php endif; ?>
<?php } ?>
</div>
<?php if (is_single() && ('' != get_the_author_meta('user_firstname'))): ?>
<footer>
<div class="author-info">
<a class="author-picture" href="<?php echo get_the_author_meta('user_url'); ?>"><?php echo get_avatar(get_the_author_meta('ID'),120); ?></a>
<p class="author-name">By <?php echo(get_the_author_meta('user_firstname') . ' ' . get_the_author_meta('user_lastname')); ?></p>
<?php if ($description = get_the_author_meta('user_description')): ?>
<div class="author-description"><?php echo wpautop($description); ?></div>
<?php endif; ?>
<?php /*
<a href="<?php echo get_author_posts_url(get_the_author_meta('ID')); ?>" class="all-posts">See all posts by <?php echo get_the_author_meta('user_firstname'); ?></a> */?>
</div>
</footer>
<?php endif; ?>
</article>
<?php if(is_single()): comments_template(); endif; ?>
<?php endwhile; ?>
<?php include (TEMPLATEPATH . '/pagination.php'); ?>
<?php else : ?>
<h1><?php _e('Not Found','achwptheme'); ?></h1>
<p><?php _e('Sorry, that cannot be found','achwptheme'); ?></p>
<?php endif; ?>
<?php get_sidebar(); ?>
<?php get_footer(); ?>