Advertisement
Guest User

Untitled

a guest
Mar 3rd, 2015
214
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.99 KB | None | 0 0
  1. $args = [
  2. 'post_type' => 'listing_type',
  3. 'posts_per_page' => -1,
  4.  
  5. 'meta_query' => array(
  6.  
  7. array(
  8. array(
  9. 'key' => 'post_title',
  10. 'value' => '"'.$this->vals['name'].'"',
  11. 'compare' => 'LIKE',
  12. )
  13. )
  14.  
  15.  
  16. )
  17.  
  18. ];
  19.  
  20. $q = new WP_Query($args);
  21.  
  22. <?php if($q->have_posts()): ?>
  23. <?php while($q->have_posts()): $q->the_post();?>
  24. <?php
  25. $custom_fields = get_post_custom(get_the_ID());
  26. $featured = $custom_fields['featured'][0];
  27. $front_page = $custom_fields['frontpage'][0];
  28. $img = $custom_fields['image'][0];
  29. $location = $custom_fields['map_location'][0];
  30. $src = wp_get_attachment_image_src(get_post_thumbnail_id($q->ID), array(300,300), false, '');
  31.  
  32. the_title();
  33. ?>
  34. <?php endwhile; ?>
  35. <?php endif; ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement