Support

Account

Home Forums General Issues Numberposts & Meta Query Not Working Reply To: Numberposts & Meta Query Not Working

  • For the second part, meta_query must be a nested array, like this

    
      'meta_query' => array(
        array(
          'key' => 'cs_industry',
          'value' => $relatedCat,
          'compare' => 'LIKE',
        )
      ),
    

    for why it’s showing 5 instead of 3, this could be that your posts_per_page value is being overridden by a pre_get_posts filter, or something similar.