Not a member of Pastebin yet?
                        Sign Up,
                        it unlocks many cool features!                    
                - <?php get_header(); ?>
 - <?php if (have_posts()) : while (have_posts()) : the_post();
 - global $post;
 - ?>
 - <?php $city_id = get_the_ID(); ?>
 - <h4>Недвижимость, размещенная в городе:</h4>
 - <?php
 - $query = new WP_Query(array(
 - 'post_type' => 'estate',
 - 'meta_query' => array(
 - array(
 - 'key' => 'estate_city',
 - 'value' => $city_id
 - )
 - ),
 - 'orderby' => 'title',
 - 'order' => 'ASC'
 - ));
 - if ( $query->have_posts() ) :
 - while ( $query->have_posts() ) : $query->the_post();
 - global $post;
 - $metaboxes_data = get_post_meta($post->ID, 'estate-metaboxes', true); ?>
 - <?php the_title(); ?>
 - <?php endwhile;
 - endif;
 - wp_reset_postdata(); ?>
 
Advertisement
 
                    Add Comment                
                
                        Please, Sign In to add comment