-
Notifications
You must be signed in to change notification settings - Fork 0
/
selectarchives.php
executable file
·73 lines (60 loc) · 1.68 KB
/
selectarchives.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
<?php
/**
* Template Name: Select Archives
*/
?>
<?php
get_header();
get_template_part( 'sidebar1' );
?>
<div class="grid-11">
<div class="subcol">
<div id="content_start" style="display : none ; "></div>
<?php
get_template_part( 'templates/partials/alert' );
?>
<?php
if (have_posts()) :
while (have_posts()) :
the_post();
$tagline = get_post_meta($post->ID, 'tagline', $single = true);
$side = get_post_meta($post->ID, 'side', $single = true);
get_template_part( 'templates/partials/title' );
?>
<div id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
<div class="entry">
<?php
the_content('<p class="serif">Read the rest of this page »</p>');
wp_link_pages(array('before' => '<p><strong>Pages:</strong> ', 'after' => '</p>', 'next_or_number' => 'number'));
?>
</div>
</div>
<?php
endwhile;
endif;
// end the main page content loop, now begin the query posts for the category
?>
<hr />
<div id="ba">
<?php
// Query posts and list them
global $wp_query;
$postid = $wp_query->post->ID;
$customcat = get_post_meta($post->ID, 'customcat', $single = true);
$tempPagnation = get_query_var('paged');
query_posts('category_name=' . $customcat . '&posts_per_page=10&paged='.$tempPagnation);
if (have_posts()) {
while (have_posts()) {
the_post();
get_template_part( 'templates/partials/post', 'archive' );
}
}
?>
</div>
<div class="pagelinks">
<?php previous_posts_link('« Newer Entries', '0') ?>
<span class="right"><?php next_posts_link('Older Entries »', 0); ?></span>
</div>
</div>
</div> <!-- end grid 11 -->
<?php get_footer(); ?>