Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php get_header(); ?>
- <!-- watson logo and ad bar -->
- <div id="adBar">
- <div id="adBarInside">
- <div id="adBarLogo">
- <a href="/"><img src="/wp-content/uploads/2013/02/watson-logo.svg" /></a>
- </div>
- <div id="adBarAd">
- <img src="/wp-content/uploads/2013/02/ad-banner.jpg" />
- </div>
- </div>
- </div>
- <!-- posts -->
- <div id="mainContent">
- <div id="contentContainer">
- <?php
- if(isset($_GET['paged'])){
- $page = $_GET['paged']-1;
- }else{
- $page = 0;
- }
- $postsPerPage = 5;
- $theOffset = $page*$postsPerPage;
- ?>
- <?php
- $arr_query = array('posts_per_page' => $postsPerPage, 'offset' => $theOffset, post_status => future, order => ASC);
- echo "<xmp>arr_query :" . __LINE__ . "\r\n"; print_r($arr_query ); echo "</xmp>";
- query_posts( $arr_query ); ?>
- <span class="hideSmall">
- <div id="postNav">
- <div id="postNavLeft" style="float: left;">
- <a href="#"><span class="filterButton navButton">FILTER BY:</span></a>
- <a href="#"><span class="sortButton navButton">SORT BY:</span></a>
- </div>
- <div id="postNavRight" style="float: right;">
- <?php posts_nav_link('separator','EARLIER','LATER'); ?>
- </div>
- </div>
- </span>
- <?php while ( have_posts() ) : the_post(); ?>
- <?php if ( has_post_thumbnail() ) : ?>
- <div id="homeImage">
- <a href="<?php the_permalink() ?>"><?php the_post_thumbnail(); ?></a>
- </div>
- <?php endif; ?>
- <div id="homeLabel">
- <h3 class="eventName"><?php the_time('l, F jS') ?> <?php the_category(', '); ?></h3><br />
- <h2 class="eventName"><a href="<?php the_permalink() ?>"><?php the_title(); ?></a></h2>
- </div>
- <?php endwhile; // end of the loop. ?>
- </div>
- </div>
- <?php get_footer(); ?>
- <?php
- function filter_where($where = '') {
- $where .= " AND post_date >= DATE( NOW() )";
- return $where;
- }
- add_filter('posts_where', 'filter_where');
- $my_query = new WP_Query(
- array(
- 'post_type'=>'post',
- 'posts_per_page' => 6,
- //'orderby' => 'date',
- 'order' => 'ASC',
- 'cat' => 5,
- 'post_status' => 'publish,future',
- )
- );
- while ( $my_query->have_posts() ) :
- $my_query->the_post();
- $do_not_duplicate = $post->ID;
- ?>
- <li><a href="<?php the_permalink() ?>"><?php the_date( 'n/d'); ?> <?php the_title(); ?></a></li>
- <?php
- endwhile;
- remove_filter('posts_where', 'filter_where');
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement