• I’m trying to get information to appear for posts that only have a meta_value of ‘test’ within the WordPress database. I tried the code below but nothing happens.

    <?php get_user_meta($user_id, $key, $single);  ?>
     <?php if ( $the_query = new WP_Query( array( 'meta_value' => 'Test' ) );) : ?>
     <p>trest</p>
       <?php endif; ?>

    I searched Google but wasn’t able to find something that worked ?? thanks!

  • The topic ‘Adding Info to Post ONLY if it has meta_value?’ is closed to new replies.