Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <ul>
- <?php
- $temp = $wp_query;
- $wp_query= null;
- $wp_query = new WP_Query();
- $today = getdate();
- $wp_query->query('showposts=10&paged='.$paged .'&category_name=events&meta_key=dateend&day='.$today .'&order=asc&post_status=publish,future');
- while ($wp_query->have_posts()) : $wp_query->the_post();
- $finaldate = get_post_meta($post->ID,'dateend', true);
- $fdate = strtotime($finaldate);
- $displayfinaldate2 = date('l, jS F Y', $fdate);
- $pm = date('m');
- $pd = date('d');
- $py = date('y');
- if($fdate < mktime(null,null,null,$pm,$pd,$py))continue;
- if( $post->ID == $do_not_duplicate ) continue; ?>
- <li>
- <table width="100%" cellpadding="0" cellspacing="0">
- <tr>
- <td class="text">
- <h3><?php the_title(); ?></h3>
- <?php the_content(); ?>
- </td></tr></table>
- </li>
- <?php endwhile; ?>
- <!-- IF THERE'S NO POST IN THE CATEGORY DIPLAY APOLOGIZE TEXT -->
- <?php /* If there are no posts to display, such as an empty archive page */ ?>
- <?php if ( ! have_posts() ) : ?>
- <div class="text">
- <h3><?php _e( 'Apologies, but no results were found for the request.'); ?></h3></div>
- <?php endif; ?>
- <?php if (function_exists("pagination")) {
- pagination($additional_loop->max_num_pages);
- } ?>
- <br />
- <?php $wp_query = null; $wp_query = $temp;?>
- </ul>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement