Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $args=array(
- 'post_type' => 'familygames',
- 'post_status' => 'publish',
- 'order' => 'ASC',
- 'orderby' => 'menu_order',
- 'posts_per_page' => 1,
- 'caller_get_posts'=> 1,
- 'year' => date('Y'),
- 'monthnum' => date('n'),
- 'day' => date('j'),
- );
- $my_query = null;
- $my_query = new WP_Query($args);
- if( !$my_query->have_posts() ) {
- $args=array(
- 'post_type' => 'familygames',
- 'post_status' => 'future',
- 'order' => 'ASC',
- 'orderby' => 'date',
- 'posts_per_page' => 1,
- 'caller_get_posts'=> 1,
- );
- $my_query = null;
- $my_query = new WP_Query($args); }
- if( $my_query->have_posts() ) {
- while ($my_query->have_posts()) : $my_query->the_post(); ?>
- <li><span><a href="<?php the_permalink(); ?>"><strong><?php the_title(); ?></strong></a></span></li>
- <?php
- endwhile;
- } else { echo 'not today Zurg'; }
- wp_reset_query();
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement