Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 121 lines (76 sloc) 3.329 kB
217f7fd Importing the News theme files and folders.
greenshady authored
1 <?php
2 /**
3 * Loop Meta Template
4 *
5 * Displays information at the top of the page about archive and search results when viewing those pages.
6 * This is not shown on the home page and singular views.
7 *
8 * @package News
9 * @subpackage Template
10 */
11 ?>
12
13 <?php if ( is_category() ) : ?>
14
15 <div class="loop-meta">
16
17 <h1 class="loop-title"><?php single_cat_title(); ?></h1>
18
19 <?php $description = category_description(); ?>
20
21 <?php if ( !empty( $description ) ) echo '<div class="loop-description">' . $description . '</div>'; ?>
22
23 </div><!-- .loop-meta -->
24
25 <?php elseif ( is_tag() ) : ?>
26
27 <div class="loop-meta">
28
29 <h1 class="loop-title"><?php single_tag_title(); ?></h1>
30
31 <?php $description = tag_description(); ?>
32
33 <?php if ( !empty( $description ) ) echo '<div class="loop-description">' . $description . '</div>'; ?>
34
35 </div><!-- .loop-meta -->
36
37 <?php elseif ( is_tax() ) : ?>
38
39 <div class="loop-meta">
40
41 <h1 class="loop-title"><?php $term = get_term_by( 'slug', get_query_var( 'term' ), get_query_var( 'taxonomy' ) ); echo $term->name; ?></h1>
42
43 <?php $description = term_description( '', get_query_var( 'taxonomy' ) ); ?>
44
45 <?php if ( !empty( $description ) ) echo '<div class="loop-description">' . $description . '</div>'; ?>
46
47 </div><!-- .loop-meta -->
48
49 <?php elseif ( is_author() ) : ?>
50
51 <?php $id = get_query_var( 'author' ); ?>
52
53 <div id="hcard-<?php the_author_meta( 'user_nicename', $id ); ?>" class="loop-meta vcard">
54
55 <h1 class="loop-title fn n"><?php the_author_meta( 'display_name', $id ); ?></h1>
56
57 <?php $description = get_the_author_meta( 'description', $id ); ?>
58
59 <?php if ( !empty( $description ) ) {
60 $avatar = get_avatar( get_the_author_meta( 'user_email', $id ), '100', '', get_the_author_meta( 'display_name', $id ) );
17df772 @justintadlock Wrap author description with wpautop().
authored
61 echo '<div class="loop-description">' . $avatar . wpautop( $description ) . '</div>';
217f7fd Importing the News theme files and folders.
greenshady authored
62 } ?>
63
64 </div><!-- .loop-meta -->
65
66 <?php elseif ( is_search() ) : ?>
67
68 <div class="loop-meta">
69
70 <h1 class="loop-title"><?php echo esc_attr( get_search_query() ); ?></h1>
71
72 <div class="loop-description">
73 <p>
b67e8bf @justintadlock Change all instances of hybrid_get_textdomain() to 'news'.
authored
74 <?php printf( __( 'You are browsing the search results for &quot;%1$s&quot;', 'news' ), esc_attr( get_search_query() ) ); ?>
217f7fd Importing the News theme files and folders.
greenshady authored
75 </p>
76 </div><!-- .loop-description -->
77
78 </div><!-- .loop-meta -->
79
80 <?php elseif ( is_date() ) : ?>
81
82 <div class="loop-meta">
b67e8bf @justintadlock Change all instances of hybrid_get_textdomain() to 'news'.
authored
83 <h1 class="loop-title"><?php _e( 'Archives by date', 'news' ); ?></h1>
217f7fd Importing the News theme files and folders.
greenshady authored
84
85 <div class="loop-description">
86 <p>
b67e8bf @justintadlock Change all instances of hybrid_get_textdomain() to 'news'.
authored
87 <?php _e( 'You are browsing the site archives by date.', 'news' ); ?>
217f7fd Importing the News theme files and folders.
greenshady authored
88 </p>
89 </div><!-- .loop-description -->
90
91 </div><!-- .loop-meta -->
92
93 <?php elseif ( is_archive() ) : ?>
94
95 <div class="loop-meta">
96
b67e8bf @justintadlock Change all instances of hybrid_get_textdomain() to 'news'.
authored
97 <h1 class="loop-title"><?php _e( 'Archives', 'news' ); ?></h1>
217f7fd Importing the News theme files and folders.
greenshady authored
98
99 <div class="loop-description">
100 <p>
b67e8bf @justintadlock Change all instances of hybrid_get_textdomain() to 'news'.
authored
101 <?php _e( 'You are browsing the site archives.', 'news' ); ?>
217f7fd Importing the News theme files and folders.
greenshady authored
102 </p>
103 </div><!-- .loop-description -->
104
105 </div><!-- .loop-meta -->
106
107 <?php elseif ( is_page_template( 'page-template-popular.php' ) ) : ?>
108
109 <div class="loop-meta">
110
b67e8bf @justintadlock Change all instances of hybrid_get_textdomain() to 'news'.
authored
111 <h1 class="loop-title"><?php _e( 'Most Popular', 'news' ); ?></h1>
217f7fd Importing the News theme files and folders.
greenshady authored
112
113 <div class="loop-description">
114 <p>
b67e8bf @justintadlock Change all instances of hybrid_get_textdomain() to 'news'.
authored
115 <?php _e( 'You are browsing the site archives by popularity.', 'news' ); ?>
217f7fd Importing the News theme files and folders.
greenshady authored
116 </p>
117 </div><!-- .loop-description -->
118
119 </div><!-- .loop-meta -->
120
121 <?php endif; ?>
Something went wrong with that request. Please try again.