Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $args = [
- 'post_type' => 'listing_type',
- 'posts_per_page' => -1,
- 'meta_query' => array(
- array(
- array(
- 'key' => 'post_title',
- 'value' => '"'.$this->vals['name'].'"',
- 'compare' => 'LIKE',
- )
- )
- )
- ];
- $q = new WP_Query($args);
- <?php if($q->have_posts()): ?>
- <?php while($q->have_posts()): $q->the_post();?>
- <?php
- $custom_fields = get_post_custom(get_the_ID());
- $featured = $custom_fields['featured'][0];
- $front_page = $custom_fields['frontpage'][0];
- $img = $custom_fields['image'][0];
- $location = $custom_fields['map_location'][0];
- $src = wp_get_attachment_image_src(get_post_thumbnail_id($q->ID), array(300,300), false, '');
- the_title();
- ?>
- <?php endwhile; ?>
- <?php endif; ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement