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.792 kb
15cba985 »
2012-09-01 theme moved from webfactional to repositoryhosting
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 *
8 * @package Uridimmu
9 * @subpackage Template
10 */
11 ?>
12
13 <?php if ( is_home() && !is_front_page() ) : ?>
14
15 <div class="loop-meta">
16
17 <h1 class="loop-title"><?php echo get_post_field( 'post_title', get_queried_object_id() ); ?></h1>
18
19 <div class="loop-description">
20 <?php echo apply_filters( 'the_excerpt', get_post_field( 'post_excerpt', get_queried_object_id() ) ); ?>
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
53 <h1 class="loop-title"><?php $term = get_term_by( 'slug', get_query_var( 'term' ), get_query_var( 'taxonomy' ) ); echo $term->name; ?></h1>
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>
91 <?php printf( __( 'You are browsing the search results for &quot;%1$s&quot;', 'uridimmu' ), esc_attr( get_search_query() ) ); ?>
92 </p>
93 </div><!-- .loop-description -->
94
95 </div><!-- .loop-meta -->
96
97 <?php elseif ( is_date() ) : ?>
98
99 <div class="loop-meta">
100 <h1 class="loop-title"><?php _e( 'Archives by date', 'uridimmu' ); ?></h1>
101
102 <div class="loop-description">
103 <p>
104 <?php _e( 'You are browsing the site archives by date.', 'uridimmu' ); ?>
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
128 <h1 class="loop-title"><?php _e( 'Archives', 'uridimmu' ); ?></h1>
129
130 <div class="loop-description">
131 <p>
132 <?php _e( 'You are browsing the site archives.', 'uridimmu' ); ?>
133 </p>
134 </div><!-- .loop-description -->
135
136 </div><!-- .loop-meta -->
137
138 <?php endif; ?>
Something went wrong with that request. Please try again.