forked from dangrossman/Blog
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcategory-code.php
More file actions
39 lines (27 loc) · 962 Bytes
/
category-code.php
File metadata and controls
39 lines (27 loc) · 962 Bytes
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
<?php get_header(); ?>
<div id="topbox">
I create and contribute to open source projects, providing free products for site owners and libraries for other programmers.
</div>
<?php while ( have_posts() ) : the_post(); ?>
<?php
$url = get_post_meta($post->ID, 'url', true);
$download = get_post_meta($post->ID, 'download', true);
$arr = explode('/', $download);
$filename = $arr[count($arr)-1];
?>
<div class="separator"></div>
<div class="post">
<h2><?php the_title(); ?></h2>
<?php the_content(); ?>
<div class="btn-group">
<a class="btn" href="<?php echo $url; ?>">Project Details</a> <a class="btn" href="<?php echo $download; ?>">Download</a>
</div>
</div>
<?php endwhile; ?>
<?php if ($wp_query->max_num_pages > 1): ?>
<ul class="pager">
<li class="previous"><?php next_posts_link('← Older posts'); ?></li>
<li class="next"><?php previous_posts_link('Newer posts →'); ?></li>
</ul>
<?php endif; ?>
<?php get_footer(); ?>