This repository has been archived by the owner on Nov 14, 2018. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
/
tag.php
61 lines (53 loc) · 1.67 KB
/
tag.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
<?php
/**
* The template for displaying Tag pages
*
* @package CWP
*/
get_header(); ?>
<main id="content" role="main">
<?php if ( have_posts() ) : ?>
<header class="archive-header">
<h1 class="archive-title"><?php printf( __( 'Tag Archives: %s', 'cwp' ), '<span>' . single_tag_title( '', false ) . '</span>' ); ?></h1>
<?php if ( tag_description() ) : // Show an optional tag description ?>
<div class="archive-meta"><?php echo tag_description(); ?></div>
<?php endif; ?>
</header><!-- .archive-header -->
<?php
/* Start the Loop */
while ( have_posts() ) : the_post();
/*
* Include the post format-specific template for the content.
*/
$featured_image_url = wp_get_attachment_url( get_post_thumbnail_id($post->ID, 'thumbnail') ); ?>
<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<?php if ( is_single() ) : ?>
<h3><a><?php the_title(); ?></a></h3>
<?php else : ?>
<h3><a href="<?php the_permalink(); ?>"><?php the_title(); ?></a></h3>
<?php endif; // is_single() ?>
<div class="metadata">
<?php cwp_display_entry_meta( false ); ?>
</div><!--/metadata-->
<?php
if ($featured_image_url != NULL) {
echo '<div class="image" style="background-image: url(' .$featured_image_url .');"></div>';
}
?>
<div class="excerpt">
<?php
if ( has_excerpt() ) {
the_excerpt();
} else {
the_content();
}
?>
</div>
</div><!--/post-->
<?php endwhile; ?>
<?php cwp_kriesi_pagination(); ?>
<?php else : ?>
<?php endif; ?>
</main><!--/content-->
<?php get_sidebar(); ?>
<?php get_footer(); ?>