-
Notifications
You must be signed in to change notification settings - Fork 0
/
category.php
91 lines (84 loc) · 4.11 KB
/
category.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
<?php get_header(); ?>
<div class="content-sidebar-wrapper">
<?php get_sidebar(); ?>
<div id="content-wrapper">
<div id="breadcrumb">
<?php if(class_exists('bcn_breadcrumb_trail'))
{
//Make new breadcrumb object
$breadcrumb_trail = new bcn_breadcrumb_trail;
//Setup our options
//Set the home_title to Blog
$breadcrumb_trail->opt['home_title'] = "Home";
$breadcrumb_trail->opt['separator'] = " » ";
//Set the current item to be surrounded by a span element, start with the prefix
$breadcrumb_trail->opt['current_item_prefix'] = '';
//Set the suffix to close the span tag
$breadcrumb_trail->opt['current_item_suffix'] = '';
//Fill the breadcrumb trail
$breadcrumb_trail->fill();
//Display the trail
$breadcrumb_trail->display();
}
?>
</div>
<div id="breadcrumbdivider"> </div>
<h1><?php single_cat_title() ?></h1>
<h2 class="cat-description"><?php echo category_description(); ?></h2>
<div id="post-content">
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<?php if( is_page() ) { ?>
<h3><?php the_title(); ?></h3>
<?php } else { ?>
<article id="post-<?php the_ID() ?>">
<h3><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a>
<br />
<small style="font-weight:normal;">Posted on <?php the_date(); ?> by <?php the_author_posts_link(); ?> | Categories: <?php the_category(', ') ; ?>
<?php the_tags( ' ' . __( '| Tagged: ' ) . ' ', ', ', ''); ?>
|
<?php if( class_exists('smartpost') ) : ?>
<?php
// Check if the permalink structure is with slashes, or the default structure with /?p=123
$permalink_url = get_permalink( $post->ID );
if( $_GET['edit_mode'] ){
$link_txt = "View mode";
}else{
$link_txt = "Edit";
if( strpos( $permalink_url, '?') ){
$permalink_url .= '&edit_mode=true';
}else{
$permalink_url .= '?edit_mode=true';
}
}
?>
<span class="editlink"><a href="<?php echo $permalink_url ?>"><?php echo $link_txt ?></a></span>
<?php else: ?>
<?php edit_post_link(__('Edit'),'<span class="editlink">','</span>'); ?>
<?php endif; ?>
</small>
</h3>
<?php } ?>
<div class="content">
<div id="post-thumb-<?php the_ID() ?>" class="post-thumb">
<a href="<?php the_permalink() ?>">
<?php the_post_thumbnail( array(100, 100) ); ?>
</a>
</div>
<?php
if( is_single() || is_page() ){
the_content();
}else{
the_excerpt();
}
?>
</div>
<div class="clear"></div>
<div id="post-meta">
<p><?php edit_post_link(); ?></p>
</div>
</article>
<?php endwhile; endif; ?>
</div><!-- end #post-content -->
</div><!-- end #content-wrapper -->
<?php get_footer(); ?>
</div><!-- end .content-sidebar-wrapper -->