WP_query problem
-
Hi there,
I am trying to do a future post query but am unsure how I would put a ‘sorry no gigs currently planned’ if no future gigs are present. This is what I am currently using for the query.
<ul> <?php $my_query = new WP_Query('category_name=live-review&post_status=future&order=ASC'); while ($my_query->have_posts()) : $my_query->the_post(); $do_not_duplicate = $post->ID; ?> <li><?php the_time('l, M j, Y') ?>: <a href="<?php the_permalink() ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>"><?php the_title(); ?></a></li> </ul> <?php endwhile;?>
Thanks
Karl
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘WP_query problem’ is closed to new replies.