This repository has been archived by the owner on Jan 28, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
/
category-blog.php
95 lines (79 loc) · 2.92 KB
/
category-blog.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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
<?php get_header(); ?>
<div class="container">
<div class="row">
<div class="col-sm-8">
<div class="row">
<div class="col-sm-12">
<?php while (have_posts()) : the_post(); ?>
<div id="post-<?php the_ID(); ?>" <?php post_class('post-wrapper'); ?>>
<div class="h1-wrapper">
<a href="<?php the_permalink(); ?>"><h1><?php the_title(); ?></h1></a>
</div>
<div class="post-blog-top">
<div class="pull-left"><?php echo pinc_human_time_diff(get_post_time('U', true)) . ' / ';the_author(); ?></div>
<div class="pull<?php if(is_rtl()){echo"-left";}else{echo"-right";} ?>"><a href="<?php the_permalink(); ?>#comments"><?php comments_number(__('0 Comments', 'pinc'), __('1 Comment', 'pinc'), __('% Comments', 'pinc'));?></a><?php edit_post_link(__('Edit', 'pinc'), ' | '); ?></div>
</div>
<?php
$imgsrc = wp_get_attachment_image_src(get_post_thumbnail_id($post->ID), 'large');
if ($imgsrc[0] != '') {
?>
<div class="post-featured-photo post-featured-photo-blog">
<a href="<?php the_permalink(); ?>" target="_blank"><img class="featured-thumb" src="<?php echo $imgsrc[0]; ?>" alt="<?php the_title_attribute(); ?>" /></a>
</div>
<?php } ?>
<div class="post-content">
<div class="thecontent">
<?php
the_content();
wp_link_pages( array( 'before' => '<p><strong>' . __('Pages:', 'pinc') . '</strong>', 'after' => '</p>' ) );
?>
</div>
<div class="clearfix"></div>
<div class="post-meta-category-tag">
<?php
$categories = get_the_category();
if($categories){
echo __('Category', 'pinc') . ' <span class="thetags">';
foreach($categories as $category) {
echo '<a href="'.get_category_link( $category->term_id ).'">'.$category->cat_name.'</a> ';
}
echo '</span>';
}
/*
$posttags = get_the_tags();
if ($posttags) {
echo __('Tags', 'pinc') . ' <span class="thetags">';
foreach($posttags as $tag) {
echo '<a href="' . get_tag_link($tag->term_id). '">' . $tag->name . '</a> ';
}
echo '</span>';
}
*/
?>
</div>
</div>
</div>
<?php endwhile; ?>
<?php if(function_exists('wp_pagenavi')) { ?>
<div class="text-center">
<div id="navigation" class="pagination">
<?php wp_pagenavi(); ?>
</div>
</div>
<?php } else { ?>
<div id="navigation-blog">
<ul class="pager">
<li class="previous"><?php next_posts_link(__('« Previous', 'pinc')) ?></li>
<li class="next"><?php previous_posts_link(__('Next »', 'pinc')) ?></li>
</ul>
</div>
<?php } ?>
</div>
</div>
</div>
<div class="col-sm-4">
<?php get_sidebar('others'); ?>
</div>
</div>
</div>
<?php get_footer(); ?>