-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsingle-project.php
More file actions
executable file
·73 lines (62 loc) · 1.52 KB
/
Copy pathsingle-project.php
File metadata and controls
executable file
·73 lines (62 loc) · 1.52 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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
<?php
/*
Template Name: Single
*/
get_header();
?>
<section id="main">
<div class="content wrapper">
<?php
if ( have_posts() ) :
while ( have_posts() ) :
the_post();
$post_id = get_the_ID();
$source_text = get_post_meta( $post_id, '_project_source_link_text', true );
$source_url = get_post_meta( $post_id, '_project_source_code_url', true );
$website_url = get_post_meta( $post_id, '_project_website_url', true );
if ( $source_url ) {
if ( empty( $source_text ) ) {
$source_text = $source_url;
}
$source_link = '<a href="' . $source_url . '">' . $source_text . '</a>';
}
if ( $website_url ) {
$website_link = '<a href="' . $website_url . '">' . $website_url . '</a>';
}
?>
<article id="<?php echo $post_id; ?>" class="ms-all ml2-ml5 d2-d7 boxed" >
<h1><?php the_title(); ?></h1>
<div>
<?php if ( $website_url ) : ?>
<?php echo 'Project URL: ' . $website_link; ?><br />
<?php endif; ?>
<?php if ( $source_url ) : ?>
<?php echo 'Source URL: ' . $source_link; ?><br />
<?php endif; ?>
</div>
<div>
Technologies:
<?php
echo get_the_term_list( $post_id, 'technology', '<ul class="flat inline"><li>', ',</li> <li>', '</li></ul>' );
?>
</div>
<?php the_content(); ?>
</article>
<section class="comments">
</section>
<?php
endwhile;
else :
?>
<article>
<h2 class="center">Not Found</h2>
<p class="center">Sorry, but you are looking for something that isn't here.</p>
<?php get_search_form(); ?>
</article>
<?php endif; ?>
</div>
</section>
<?php
get_footer();
?>