-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtemplate-gallery.php
More file actions
56 lines (47 loc) · 1.45 KB
/
template-gallery.php
File metadata and controls
56 lines (47 loc) · 1.45 KB
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
<?php
/*
Template Name: Gallery
*/
?>
<?php get_header(); ?>
<div class="particles " id="particles"></div>
<div class="gallery__container " id="gallery">
<?php
// First we need to show content from WordPress editor so use this code:
if ( have_posts() ) : while ( have_posts() ) : the_post();
// the_content();
endwhile; else: ?>
<p>Sorry, no posts matched your criteria.</p>
<?php endif; ?>
<?php
$loop = new WP_Query( array( 'post_type' => 'tappingbones_artist', 'posts_per_page' => 10 ) );
while ( $loop->have_posts() ) : $loop->the_post();
?>
<div class="artist--gallery artist " >
<div class="card-bg">
<a rel="#bio-<?php echo $post->ID ?>">
<img src="<?php $src = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ),'medium', false ); echo $src[0] ?>)"/>
<h3 class="entry-title">
<?php the_title() ?>
</h3>
<p>
<?php the_excerpt() ?>
</p>
</a>
</div>
</div>
<?php endwhile; ?>
<div class="gallery__info-section">
<h1 class="gallery__artist-placeholder"> Our Amazing Artists ! </h1>
<?php while ( $loop->have_posts() ) : $loop->the_post();
?>
<div class="gallery__artist-bio" id="bio-<?php echo $post->ID ?>" >
<img src="<?php $src = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ),'large', false ); echo $src[0] ?>)"/>
<a class="close">〈</a>
<h1><?php the_title() ?></h1>
<p><?php the_content() ?></p>
</div>
<?php endwhile; ?>
</div>
</div>
<?php get_footer(); ?>