Advertisement
Guest User

order by date

a guest
May 23rd, 2012
1,737
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.27 KB | None | 0 0
  1. <div id="artist-related-shows">
  2.        
  3.     <h2 class="header">upcoming shows:</h2>
  4.         <?php query_posts( array(
  5.             'cat' => 'shows',
  6.             "order" => 'desc',
  7.             'orderby' => 'meta_value',
  8.             'meta_key' => 'show_info_date',
  9.             'artist' => wp_title("",false), //this gets the page name which =(artist name)
  10.             'showposts' => 3
  11.             ) ); ?>
  12.            
  13.         <?php if (have_posts()) : while (have_posts()) : the_post(); ?>
  14.  
  15.            
  16.            
  17.         <!-- i don't remember what this next line is...   but it needs to be here for the shows to stay aligned... so... remember to learn about this-->
  18.        
  19.     <div <?php post_class() ?> id="post-<?php the_ID(); ?>">
  20.    
  21.         <div class="show_entry">
  22.  
  23.                 <a href="<?php the_permalink() ?>">
  24.                 <h2 class="show_title"><?php echo get ('show_info_date') ?></h2></a>/>
  25.                
  26.                     <?php the_content ?>
  27.                     <?php echo get ('show_info_artist') ?> @
  28.                
  29.                     <?php echo get ('show_info_venue') ?>.
  30.                
  31.                     <?php echo get ('show_info_time') ?>  
  32.                     <?php echo get ('show_info_age') ?>
  33.                
  34.  
  35.         </div> <!--end show-entry" -->
  36.  
  37.     </div> <!--end post class thing... ?"-->
  38.  
  39.     <?php endwhile; ?>
  40.  
  41.     <?php else : ?>
  42.  
  43.         <h1>there are currently no shows posted for this artist.</h1>
  44.  
  45.     <?php endif; ?>
  46.     <?php wp_reset_query(); ?>
  47.    
  48.    
  49. </div> <!--end artist-related-shows -->
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement