I would like this query to only show the posts if it contains and text that comes from geodir_special_offers echo
<?php
global $post;
$args = array(
'posts_per_page' => 4 , 'post_type' => 'gd_arts',);
$lastposts = get_posts( $args ); foreach ( $lastposts as $post ) : setup_postdata( $post ); ?>
<h2><a href="<?php the_permalink(); ?>"> <?php the_title(); ?> </a></h2>
<?php if ( has_post_thumbnail() ) {
the_post_thumbnail(array(486,226));
} ?>
<php echo $post->geodir_special_offers; ?>
<?php endforeach;
wp_reset_postdata();
?>
I am quite new to WP queries so bear with me.
Sorry in advance if it is not structured 100%.