Advertisement
Guest User

Untitled

a guest
Dec 6th, 2016
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.78 KB | None | 0 0
  1. <h2>Sold Properties</h2>
  2.  
  3. <?php
  4. $args = array(
  5. 'post_type' => 'property',
  6. 'posts_per_page' => 8,
  7. 'meta_query' => array(
  8. array(
  9. 'key' => '_on_market',
  10. 'value' => 'yes',
  11. 'compare' => '!=',
  12. ),
  13. ),
  14. 'tax_query' => array(
  15. array(
  16. 'taxonomy' => 'availability',
  17. 'field' => 'name',
  18. 'terms' => array( 'Sold' ),
  19. ),
  20. )
  21. );
  22. $sold_query = new WP_Query($args);
  23.  
  24. if ( $sold_query->have_posts() ) : ?>
  25.  
  26. <?php propertyhive_property_loop_start(); ?>
  27.  
  28. <?php while ( $sold_query->have_posts() ) : $sold_query->the_post(); ?>
  29.  
  30. <?php ph_get_template_part( 'content', 'property' ); ?>
  31.  
  32. <?php endwhile; // end of the loop. ?>
  33.  
  34. <?php propertyhive_property_loop_end(); ?>
  35.  
  36. <?php endif; ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement