Thanks to John Huebner
But your code not working, do you have full code for this query
Thanks
<?php
$post_id = get_the_ID();
$args = array(
'post_type' => 'post',
'posts_per_page'=> -1,
'meta_query' => array(
array(
'key' => 'attraction_in',
'value' => $post_id,
'compare' => 'IN'
)
)
);
// query
$wp_query = new WP_Query( $args );
if ($wp_query->have_posts() ) :
echo '<div class="single-destination-list-items">';
echo '<h3>Top attractions in '.get_the_title( $post_id ).'</h3>';
echo '<ul>';
while( $wp_query->have_posts() ) { $wp_query->the_post();
?>
<li>
<a href="<?php the_permalink(); ?>"><?php echo get_the_post_thumbnail( $page->ID, 'tours' ); ?></a>
<div class="items-right">
<a href="<?php the_permalink(); ?>" title="<?php the_title(); ?>"><?php the_title(); ?></a>
</div>
</li>
<?php
}
echo '</ul>';
echo '</div>';
endif;
?>
I did use this code, but not working fine, please help me .
Thanks
Your code not working fine