This repository has been archived by the owner on Oct 22, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
taxonomy-gallery_position.php
73 lines (71 loc) · 3.1 KB
/
taxonomy-gallery_position.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
62
63
64
65
66
67
68
69
70
71
72
73
<?php
get_header(); ?>
<main id="main" class="gallery-archive">
<header class="header">
<div class="ucla campus masthead">
<div class="col span_12_of_12">
<?php get_breadcrumb(); ?>
<h1 class="entry-title"> <?php echo $term->name; ?></h1>
</div>
</div>
</header>
<div class="ucla campus entry-content">
<div class="col span_12_of_12">
<div id="nav-second" class="nav-secondary" aria-label="Secondary Menu">
<ul class="nav-secondary__list">
<?php
$gallery_position = get_terms(
array(
'taxonomy' => 'gallery_position'
)
);
if (! empty( $gallery_position ) && is_array( $gallery_position )) {
foreach ($gallery_position as $position) {
?>
<li class="nav-secondary__item">
<a class="nav-secondary__link" href="<?php echo esc_url( get_term_link( $position ) ) ?>">
<?php echo $position->name; ?>
</a>
</li>
<?php
}
}
?>
</ul>
</div>
</div>
<div class="col span_12_of_12">
<?php
if ( have_posts()) :
// Start the Loop
while (have_posts()) : the_post();
// Loop Content
$thumb_id = get_post_thumbnail_id( $post->ID );
if ( '' != $thumb_id ) {
$thumb_url = wp_get_attachment_image_src( $thumb_id, 'full', true );
$image = $thumb_url[0];
}
?>
<article class="basic-card">
<a href="<?php echo get_permalink( $post->ID ); ?>"><img class="basic-card__image" src="<?php echo (has_post_thumbnail() ? $image : '/wp-content/themes/ucla-wp/images/overlay.jpg'); ?>" alt=<?php the_title(); ?>></a>
<div class="basic-card__info-wrapper">
<a href="<?php echo get_permalink( $post->ID ); ?>">
<h1 class="basic-card__title"><span><?php the_title(); ?></span></h1>
<p class="basic-card__description"><?php the_excerpt(); ?></p>
</a>
</div>
</article>
<?php
// End the Loop
endwhile;
else :
// If no posts match this query, output this text.
_e('Sorry, no results match your criteria.', 'textdomain');
endif;
wp_reset_postdata();
?>
</div>
<div class="col span_1_of_12" style="min-height: 1px;"></div>
</div>
</main>
<?php get_footer(); ?>