Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 138 lines (89 sloc) 3.698 kb
b32764df » greenshady
2011-03-19 Importing the Trending theme files and folders.
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 front page or singular views.
7 *
c4bc693a » greenshady
2011-05-23 Ready for beta 1.
8 * @package Trending
b32764df » greenshady
2011-03-19 Importing the Trending theme files and folders.
9 * @subpackage Template
10 */
11 ?>
12
13 <?php if ( is_home() && !is_front_page() ) : ?>
14
15 <div class="loop-meta">
16
afd81eab » greenshady
2011-05-31 Trending v.0.1.0 is ready.
17 <h1 class="loop-title"><?php echo get_post_field( 'post_title', get_queried_object_id() ); ?></h1>
b32764df » greenshady
2011-03-19 Importing the Trending theme files and folders.
18
19 <div class="loop-description">
afd81eab » greenshady
2011-05-31 Trending v.0.1.0 is ready.
20 <?php echo apply_filters( 'the_excerpt', get_post_field( 'post_excerpt', get_queried_object_id() ) ); ?>
b32764df » greenshady
2011-03-19 Importing the Trending theme files and folders.
21 </div><!-- .loop-description -->
22
23 </div><!-- .loop-meta -->
24
25 <?php elseif ( is_category() ) : ?>
26
27 <div class="loop-meta">
28
29 <h1 class="loop-title"><?php single_cat_title(); ?></h1>
30
31 <div class="loop-description">
32 <?php echo category_description(); ?>
33 </div><!-- .loop-description -->
34
35 </div><!-- .loop-meta -->
36
37 <?php elseif ( is_tag() ) : ?>
38
39 <div class="loop-meta">
40
41 <h1 class="loop-title"><?php single_tag_title(); ?></h1>
42
43 <div class="loop-description">
44 <?php echo tag_description(); ?>
45 </div><!-- .loop-description -->
46
47 </div><!-- .loop-meta -->
48
49 <?php elseif ( is_tax() ) : ?>
50
51 <div class="loop-meta">
52
afd81eab » greenshady
2011-05-31 Trending v.0.1.0 is ready.
53 <h1 class="loop-title"><?php single_term_title(); ?></h1>
b32764df » greenshady
2011-03-19 Importing the Trending theme files and folders.
54
55 <div class="loop-description">
56 <?php echo term_description( '', get_query_var( 'taxonomy' ) ); ?>
57 </div><!-- .loop-description -->
58
59 </div><!-- .loop-meta -->
60
61 <?php elseif ( is_author() ) : ?>
62
63 <?php $user_id = get_query_var( 'author' ); ?>
64
65 <div id="hcard-<?php the_author_meta( 'user_nicename', $user_id ); ?>" class="loop-meta vcard">
66
67 <h1 class="loop-title fn n"><?php the_author_meta( 'display_name', $user_id ); ?></h1>
68
69 <div class="loop-description">
70 <?php $desc = get_the_author_meta( 'description', $user_id ); ?>
71
72 <?php if ( !empty( $desc ) ) { ?>
73 <?php echo get_avatar( get_the_author_meta( 'user_email', $user_id ), '100', '', get_the_author_meta( 'display_name', $user_id ) ); ?>
74
75 <p class="user-bio">
76 <?php echo $desc; ?>
77 </p><!-- .user-bio -->
78 <?php } ?>
79 </div><!-- .loop-description -->
80
81 </div><!-- .loop-meta -->
82
83 <?php elseif ( is_search() ) : ?>
84
85 <div class="loop-meta">
86
87 <h1 class="loop-title"><?php echo esc_attr( get_search_query() ); ?></h1>
88
89 <div class="loop-description">
90 <p>
d5966244 »
2012-08-23 Don't use function for theme's textdomain. Hardcode it.
91 <?php printf( __( 'You are browsing the search results for "%s"', 'trending' ), esc_attr( get_search_query() ) ); ?>
b32764df » greenshady
2011-03-19 Importing the Trending theme files and folders.
92 </p>
93 </div><!-- .loop-description -->
94
95 </div><!-- .loop-meta -->
96
97 <?php elseif ( is_date() ) : ?>
98
99 <div class="loop-meta">
d5966244 »
2012-08-23 Don't use function for theme's textdomain. Hardcode it.
100 <h1 class="loop-title"><?php _e( 'Archives by date', 'trending' ); ?></h1>
b32764df » greenshady
2011-03-19 Importing the Trending theme files and folders.
101
102 <div class="loop-description">
103 <p>
d5966244 »
2012-08-23 Don't use function for theme's textdomain. Hardcode it.
104 <?php _e( 'You are browsing the site archives by date.', 'trending' ); ?>
b32764df » greenshady
2011-03-19 Importing the Trending theme files and folders.
105 </p>
106 </div><!-- .loop-description -->
107
108 </div><!-- .loop-meta -->
109
110 <?php elseif ( function_exists( 'is_post_type_archive' ) && is_post_type_archive() ) : ?>
111
112 <?php $post_type = get_post_type_object( get_query_var( 'post_type' ) ); ?>
113
114 <div class="loop-meta">
115
116 <h1 class="loop-title"><?php post_type_archive_title(); ?></h1>
117
118 <div class="loop-description">
119 <?php if ( !empty( $post_type->description ) ) echo "<p>{$post_type->description}</p>"; ?>
120 </div><!-- .loop-description -->
121
122 </div><!-- .loop-meta -->
123
124 <?php elseif ( is_archive() ) : ?>
125
126 <div class="loop-meta">
127
d5966244 »
2012-08-23 Don't use function for theme's textdomain. Hardcode it.
128 <h1 class="loop-title"><?php _e( 'Archives', 'trending' ); ?></h1>
b32764df » greenshady
2011-03-19 Importing the Trending theme files and folders.
129
130 <div class="loop-description">
131 <p>
d5966244 »
2012-08-23 Don't use function for theme's textdomain. Hardcode it.
132 <?php _e( 'You are browsing the site archives.', 'trending' ); ?>
b32764df » greenshady
2011-03-19 Importing the Trending theme files and folders.
133 </p>
134 </div><!-- .loop-description -->
135
136 </div><!-- .loop-meta -->
137
138 <?php endif; ?>
Something went wrong with that request. Please try again.