/
archive-publication.php
74 lines (60 loc) · 2.46 KB
/
archive-publication.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
74
<?php
$thumbnail = wp_get_attachment_image_src( get_post_thumbnail_id( $post->ID ) );
?>
<?php get_header(); ?>
<main id="main">
<?php if ( have_posts() ) : while ( have_posts() ) : the_post(); ?>
<header class="header" <?php if ( has_post_thumbnail() ) { ?> style="background-image: url(<?php echo $thumbnail[0]; ?>);" <?php } ?>>
<div class="ucla campus">
<div class="col span_12_of_12">
<div class="breadcrumb"><?php get_breadcrumb(); ?></div>
</header>
<div class="ucla campus">
<div class="col span_9_of_12">
<?php
$args = array(
'post_type'=>'publication',
'post_status'=>'publish',
'post_per_page'=>20,
'orderby' => 'meta_value',
'meta_key' => '_article_date',
'order'=>'ASC'
);
$loop = new WP_Query( $args );
while ( $loop->have_posts() ) : $loop->the_post();?>
<p><b><?php $author_id = intval( get_query_var( 'author' ) ); echo get_the_author_meta( 'display_name', $author_id ); ?></b>, <?php the_title(); ?>, <em><?php if(get_post_meta($post->ID, '_article_journal', true)):
echo get_post_meta($post->ID, '_article_journal', true);
endif;?>
</em>,
<?php if(get_post_meta($post->ID, '_article_volume', true)):
echo get_post_meta($post->ID, '_article_volume', true);
endif;?>, (<?php if(get_post_meta($post->ID, '_article_number', true)):
echo get_post_meta($post->ID, '_article_number', true);
endif;?>), (p. <?php if(get_post_meta($post->ID, '_article_pages', true)):
echo get_post_meta($post->ID, '_article_pages', true);
endif;?>), doi:
<?php if(get_post_meta($post->ID, '_article_DOI', true)):
echo get_post_meta($post->ID, '_article_DOI', true);
endif;?>, (<?php if(get_post_meta($post->ID, '_article_month', true)):
echo get_post_meta($post->ID, '_article_month', true);
endif;?>/<?php if(get_post_meta($post->ID, '_article_year', true)):
echo get_post_meta($post->ID, '_article_year', true);
endif;?>).
</p>
<?php
endwhile;?>
<?php
/** @var string|false|WP_Error $tag_list */
$tag_list = get_the_tag_list( ' ', ' ' );
if ( $tag_list && ! is_wp_error( $tag_list ) ) {
echo $tag_list;
}
?>
</div>
<?php endwhile; endif; ?>
<div class="col span_3_of_12">
<?php get_sidebar(); ?>
</div>
</div>
</main>
<?php get_footer(); ?>