-
Notifications
You must be signed in to change notification settings - Fork 0
/
sidebar-home.php
executable file
·41 lines (40 loc) · 1.62 KB
/
sidebar-home.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
<?php if ( function_exists( 'dynamic_sidebar' ) ) : ?>
<aside class="home">
<section class="think">
<h2>think tank</h2>
<ul class="list">
<?php query_posts('cat=99&posts_per_page=5'); while ( have_posts() ) : the_post(); ?>
<li><a href="<?php echo the_permalink();?>" title="<?php the_title();?>"><?php short_title(); ?></a></li>
<?php endwhile; wp_reset_query(); ?>
</ul>
<div class="arrow slide1"> </div>
</section>
<section class="fun">
<h2>fun stuff</h2>
<ul class="list">
<?php
$forfun = array(
'tax_query' => array(
'relation' => 'OR',
array('taxonomy' => 'category', 'field' => 'slug', 'terms' => array('for-fun')),
array('taxonomy' => 'post_tag', 'field' => 'slug', 'terms' => array('for-fun'))
), 'showposts'=>5);
$fun_query = new WP_Query($forfun);
while ($fun_query->have_posts()) : $fun_query->the_post();
?>
<li><a href="<?php echo the_permalink();?>" title="<?php the_title();?>"><?php short_title(); ?></a></li>
<?php endwhile; wp_reset_query(); ?>
</ul>
<div class="arrow slide2"> </div>
</section>
<section class="portfolio">
<h2>portfolio</h2>
<ul class="list">
<?php query_posts('post_type=portfolio&posts_per_page=5'); while ( have_posts() ) : the_post(); ?>
<li><a href="<?php echo the_permalink();?>" title="<?php the_title();?>"><?php short_title(); ?></a></li>
<?php endwhile; wp_reset_query(); ?>
</ul>
<div class="arrow slide3"> </div>
</section>
</aside>
<?php endif; ?>