Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Aug 8th, 2012  |  syntax: None  |  size: 0.46 KB  |  hits: 5  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. <?php
  2.                        
  3.                                 $postidnum = $wp_query->post->ID;
  4.                        
  5.                                 $args = array(
  6.                                         'post_type' => 'contacts',
  7.                                         'showposts' =>'-1',
  8.                                         'meta_key' => 'last_name',
  9.                                         'orderby' => 'meta_value',
  10.                                         'order' => 'ASC',
  11.                                         'meta_query' => array(
  12.                                                 array(
  13.                                                         'key' => 'department_commitee',
  14.                                                         'value' => $postidnum
  15.                                                 )
  16.                                         )
  17.                                  );
  18.                        
  19.                                 $contacts = new WP_Query( $args );
  20.                                 while ( $contacts->have_posts() ) :
  21.                                 $contacts->the_post();
  22.                         ?>