rakeshr

unique custom fields value not working

Feb 14th, 2012
490
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.67 KB | None | 0 0
  1.  <?php
  2.   query_posts( array( 'post_type' => 'post', 'showposts' => 10 ) );
  3.   if ( have_posts() ) : while ( have_posts() ) : the_post();
  4. ?>
  5.          
  6.          
  7.                 <?php $judges = get_post_meta($post->ID, 'judge', false); ?>
  8.  
  9.  
  10.  
  11.     <ul>
  12.         <?php foreach($judges as $judge) {
  13.            
  14.            
  15.             echo '<li>'; ?>
  16.             <a href="<?php echo esc_url( home_url( '/' ) ); ?>judge/<?php echo get_post_meta($post->ID, 'judge', true) ?>" rel="bookmark" title="Permanent Link to <?php the_title_attribute(); ?>">
  17.            
  18.             <?php echo $judge; ?>
  19.             <?php  echo '</a></li>';
  20.            
  21.            
  22.            
  23. } ?>
  24.     </ul>
  25.    
  26.  
  27.    
  28.             <?php endwhile; endif; wp_reset_query(); ?>
Advertisement
Add Comment
Please, Sign In to add comment