-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpage-artists.php
67 lines (63 loc) · 2.05 KB
/
page-artists.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
<?php
/*
Template Name: Artists Page
*/
?>
<?php get_header() ?>
<div class="index-view">
<span class="active"><a href="<?php echo get_permalink('5') ?>">Index</a></span>
<span><a href="<?php echo get_permalink('66') ?>">Preview</a></span>
</div>
<div class="content">
<?php the_post() ?>
<div id="page-<?php the_ID() ?>" <?php post_class() ?>>
<div class="index-wrapper index-list-wrapper">
<div class="index-header">
<div class="column-artist column active" data-filter=".column-artist"><span><i>Artist</i></span></div>
<div class="column-author column" data-filter=".column-author"><span><i>Author</i></span></div>
<div class="column-essay column" data-filter=".column-essay"><span><i>Essay</i></span></div>
</div>
<div class="index-body">
<?php
$args = array(
'post_type' => 'post',
'posts_per_page' => -1,
'orderby' => 'meta_value',
'meta_key' => 'artist_name',
'order' => 'asc'
);
remove_all_filters('posts_orderby');
$the_query = new WP_Query( $args );
if ( $the_query->have_posts() ) :
while ( $the_query->have_posts() ) :
$the_query->the_post();
?>
<div class="index-row">
<div class="column-artist column active">
<a href="<?php the_permalink() ?>" data-essay="true">
<?php the_field('artist_name') ?>
</a>
</div>
<div class="column-author column">
<a href="<?php the_permalink() ?>" data-essay="true">
<?php the_field('author_name') ?>
</a>
</div>
<div class="column-essay column">
<a href="<?php the_permalink() ?>" data-essay="true">
<?php the_title() ?>
</a>
</div>
</div>
<?php
endwhile;
endif;
wp_reset_postdata();
?>
</div>
</div>
</div><!-- .post -->
</div><!-- .content -->
<?php get_footer() ?>
</body>
</html>