/
single-publication.php
executable file
·80 lines (66 loc) · 2.08 KB
/
single-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
75
76
77
78
79
80
<?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>
<h1 class="entry-title"><?php the_title(); ?></h1> </div>
</div>
</header>
<div class="ucla campus">
<div class="col span_9_of_12"><?php edit_post_link(); ?>
<?php the_content(); ?>
<?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">
<ul>
<?php if(get_post_meta($post->ID, 'Author', true)):?>
<li>
Author: <?php echo get_post_meta($post->ID, 'Author', true);?>
</li>
<?php endif;?>
<?php if(get_post_meta($post->ID, 'Journal', true)):?>
<li>
Journal: <?php echo get_post_meta($post->ID, 'Journal', true);?>
</li>
<?php endif;?>
<?php if(get_post_meta($post->ID, 'Volume', true)):?>
<li>
Volume: <?php echo get_post_meta($post->ID, 'Volume', true);?>
</li>
<?php endif;?>
<?php if(get_post_meta($post->ID, 'Pages', true)):?>
<li>
Pages: <?php echo get_post_meta($post->ID, 'Pages', true);?>
</li>
<?php endif;?>
<?php if(get_post_meta($post->ID, 'ISSN', true)):?>
<li>
ISSN: <?php echo get_post_meta($post->ID, 'ISSN', true);?>
</li>
<?php endif;?>
<?php if( get_post_meta($post->ID, 'DOI', true)):?>
<li>
DOI: <?php echo get_post_meta($post->ID, 'DOI', true);?>
</li>
<?php endif;?>
<?php if(get_post_meta($post->ID, 'URL', true)):?>
<?php
echo '<li> URL: <a href="' . get_post_meta($post->ID, 'URL', true). '"> link to publication</a></li>';?>
<?php endif;?>
</ul>
</div>
</div>
</main>
<?php get_footer(); ?>