-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy patharchives.php
More file actions
123 lines (101 loc) · 5.03 KB
/
Copy patharchives.php
File metadata and controls
123 lines (101 loc) · 5.03 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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
<?php
/**
* Template Name: Archives Template
* The template for displaying all pages.
*
* This is the template that displays all pages by default.
* Please note that this is the WordPress construct of pages
* and that other 'pages' on your WordPress site will use a
* different template.
*
* @package simpless
* @since simpless 1.0
*/
get_header(); ?>
<section class="jumbotron jumbotron-inner">
<div class="container">
<div class="masthead">
<h2>When you take technology and mix it with art, you always come up with something innovative.</h2>
</div>
</div>
</section>
<div class="container" role="archives">
<div class="row">
<div class="span12">
<div id="primary" class="content-area">
<div id="content" class="site-content" role="main">
<?php
if ( is_page('15') ) {
$cat = array(3);
} elseif ( is_page('20') ) {
$cat = array(4);
} elseif ( is_page('32') ) {
$cat = array(5, 7);
} else {
$cat = '';
}
$args = array(
'category__in' => $cat,
'caller_get_posts' => 1
);
if ( $paged > 1 ) {
$args['paged'] = $paged;
}
$my_query = new WP_Query($args); ?>
<?php if (have_posts()) : while (have_posts()) : the_post(); ?>
<div class="post" id="post-<?php the_ID(); ?>">
<h2><?php the_title(); ?></h2>
<hr />
<div class="entry">
<?php the_content('<p class="serif">Read the rest of this page »</p>'); ?>
<?php wp_link_pages(array('before' => '<p><strong>Pages:</strong> ', 'after' => '</p>', 'next_or_number' => 'number')); ?>
</div>
</div>
<?php endwhile; endif; ?>
<?php if ( $my_query->have_posts() ) : ?>
<?php while ( $my_query->have_posts() ) : $my_query->the_post(); ?>
<?php
//necessary to show the tags
global $wp_query;
$wp_query->in_the_loop = true;
?>
<article class="archive-post">
<header class="span4 entry-header">
<h3 class="entry-title">
<a href="<?php the_permalink() ?>" rel="bookmark" title="<?php the_title_attribute(); ?>"><?php the_title(); ?></a>
</h3>
<div class="entry-meta">
<?php simpless_posted_on(); ?>
</div>
</header>
<div class="span8">
<div class="entry-content">
<?php $shortex = substr(get_the_excerpt(), 0, 200);echo $shortex; echo "\r\n"; ?>
</div><!-- .entry-content -->
</div>
</article>
<?php endwhile; ?>
<?php else : ?>
<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(); ?>
<?php endif; ?>
</div><!-- #content .site-content -->
</div><!-- #primary .content-area -->
</div>
</div>
</div>
<div class="container">
<div class="row">
<div class="span3">
<h2>Search</h2>
</div>
<div class="span9 search">
<form role="search" method="get" id="searchform" action="<?php echo home_url( '/' ); ?>">
<input type="text" value="" placeholder="Search" name="s" id="s" class="input-block-level" />
</div>
</form>
</div>
</div>
</div>
<?php get_footer(); ?>