This repository has been archived by the owner on Sep 3, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
archive.php
58 lines (46 loc) · 2.1 KB
/
archive.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
<?php get_header(); ?>
<div id="site">
<div id="content">
<?php if (is_tag()) { ?>
<h2>Contacts Tagged with <span class="archived-feature"><?php single_tag_title(); ?></span></h2>
<?php /* If this is a category archive */ } elseif (is_category()) { ?>
<h2>Contacts in the <span class="archived-feature"><?php single_cat_title(''); ?></span> category.</h2>
<?php /* If this is a yearly archive */ } elseif (is_day()) { ?>
<h2>Contacts added on <span class="archived-feature"><?php the_time('l, F jS, Y'); ?></span></h2>
<?php /* If this is a monthly archive */ } elseif (is_month()) { ?>
<h2>Contacts added in <span class="archived-feature"><?php the_time('F, Y'); ?></span></h2>
<?php /* If this is a yearly archive */ } elseif (is_year()) { ?>
<h2>Contacts added in <span class="archived-feature"><?php the_time('Y'); ?></span></h2>
<?php /* If these are search results */ } elseif (is_search()) { ?>
<h2>Contacts that match '<span class="archived-feature"><?php the_search_query(); ?></span>'</h2>
<?php /* Anything else that may get through the above filters */ } else {?>
<h2>Contacts</h2>
<?php } ?>
<table>
<thead>
<tr>
<th scope="col" abbr="">Organization Name</th>
<th scope="col" abbr="">Contact Name</th>
<th scope="col" abbr="">Categories</th>
</tr>
</thead>
<?php $alt = ""; ?>
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<?php if ($alt == "") { $alt = " alt"; } else { $alt = ""; } ?>
<tr class="contact<?php echo $alt; ?>">
<td>
<a href="<?php the_permalink(); ?>"><?php echo get_post_meta($post->ID, "organization_name_wpcm_value", true); ?></a>
</td>
<td>
<a href="<?php the_permalink(); ?>"><?php echo get_post_meta($post->ID, "contact_name_wpcm_value", true); ?></a>
</td>
<td class="m-category"><?php the_category(' '); ?></td>
</tr>
<?php endwhile; ?>
</table>
<?php else: ?>
<p><?php _e('Sorry, no posts matched your criteria.'); ?></p>
<?php endif; ?>
</div>
<?php get_sidebar(); ?>
<?php get_footer(); ?>