Advertisement
Guest User

Untitled

a guest
Oct 6th, 2011
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.78 KB | None | 0 0
  1. <?php
  2. $paged = (get_query_var('paged')) ? get_query_var('paged') : 1;
  3. $args = array(
  4.    'cat' =>21,
  5.    'posts_per_page' => 999999,
  6.    'paged' => $paged,
  7.    'orderby' => 'meta_value',
  8.    'meta_query' => array(
  9.         array(
  10.             'key' => 'title',
  11.             'type' => 'DECIMAL',
  12.         )
  13.     ),
  14.    'order' => 'ASC',
  15.    );
  16. $the_query = new WP_Query($args);
  17. ?>
  18. <div id="listings">
  19.  
  20.     <?php if ($the_query->have_posts()) : ?>
  21.  
  22. <?php while ($the_query->have_posts()): $the_query->the_post(); ?>
  23.             <div <?php post_class() ?> id="post-<?php the_ID(); ?>">
  24.                 <div class="title1 active_listing">
  25.                     <?php
  26.                     if (in_category('6')) {
  27.                     the_title();
  28.                     } else {
  29.                     ?>
  30.  
  31.                     <a href="<?php the_permalink() ?>" rel="bookmark"><?php the_title(); ?></a>
  32.                     <?php
  33.                     }
  34.                     ?>
  35.                 </div>
  36.  
  37.                     <div class="alignleft thumb"><?php the_post_thumbnail('thumbnail'); ?>
  38. <br />
  39. </div>
  40.             <div class="content"><?php the_excerpt(); ?> </div>
  41.  
  42.                     <?php
  43.                     if (in_category('6')) {
  44.                     ?>
  45. <br />
  46.                     <?php
  47.                     } else {
  48.                     ?>
  49. <a href="<?php the_permalink() ?>" rel="bookmark"> View Details</a>
  50. <br />
  51.                     <?php
  52.                     }
  53.                     ?>
  54.  
  55.             </div>
  56.  
  57.         <?php endwhile; wp_reset_postdata();?>
  58.  
  59.     <?php else : ?>
  60.  
  61.         <h2 class="center">Not Found</h2>
  62.         <p class="center">Sorry, but you are looking for something that isn't here.</p>
  63.         <?php get_search_form(); ?>
  64.  
  65.     <?php endif; ?>
  66.  
  67.     </div>
  68.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement