This repository was archived by the owner on Apr 28, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcontent-single.php
More file actions
70 lines (63 loc) · 2.76 KB
/
content-single.php
File metadata and controls
70 lines (63 loc) · 2.76 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
<?php if( has_post_thumbnail() ): ?>
<header>
<div class="hero-unit wordstrap-featured-image">
<h1><?php the_title(); ?></h1>
<?php echo get_post_meta($post->ID, "wordstrap_hero_area_text", true); ?>
</div>
<div class="row">
<div class="post-meta <?php wordstrap_main_content_span(); ?>">
<p><?php echo __("Posted in"); ?> <?php the_category(", "); ?></p>
</div>
</div>
</header>
<?php endif; ?>
<article class="row" id="post-<?php the_ID(); ?>">
<?php if(!has_post_thumbnail()): ?>
<header>
<div class="<?php wordstrap_main_content_span(); ?>">
<h2><?php the_title(); ?></h2>
<!-- show the author, date and comment count -->
<div class="btn-group">
<a href="<?php echo get_author_posts_url(get_the_author_meta( 'ID' )); ?>" title="<?php the_author_meta('display_name'); ?>" class="btn btn-small" rel="author"><i class="icon-user"></i> <?php the_author_meta('display_name'); ?></a>
<a class="btn btn-small"><i class="icon-time"></i> <?php the_date(); ?></a>
<a href="<?php comments_link() ?>" class="btn btn-small"><i class="icon-comment"></i> <?php comments_number("0", "1", "%"); ?></a>
</div>
</div>
</header>
<?php endif; ?>
<div class="post-contents <?php wordstrap_main_content_span(); ?>">
<?php the_content(); ?>
</div>
<footer>
<div class="<?php wordstrap_main_content_span(); ?>">
<!-- show the categories -->
<p>
<div class="btn-group">
<?php $categories = get_the_category(); ?>
<?php if($categories) : ?>
<a class="btn btn-small">
<i class="icon-folder-open"></i>
<?php echo (count($categories) > 1 ? __("Categories") : __("Category")); ?>:
</a>
<?php foreach($categories as $category) : ?>
<a class="btn btn-small" href="<?php echo get_category_link($category->term_id); ?>">
<?php echo $category->cat_name; ?>
</a>
<?php endforeach; ?>
<?php endif; ?>
</div>
</p>
<!-- show the tags -->
<p>
<div class="btn-group">
<a class="btn btn-small"><i class="icon-tags"></i> <?php echo __("Tags"); ?>:</a>
<?php if(get_the_tags()): foreach(get_the_tags() as $tag) :?>
<a class="btn btn-small" href="<?php echo get_tag_link($tag->term_id); ?>"><?php echo $tag->name; ?></a>
<?php endforeach; else : ?>
<a class="btn disabled"><?php echo __("no tags"); ?></a>
<?php endif; ?>
</div>
</p>
</div>
</footer>
</article>