The Support Forums will be in read-only mode for a scheduled maintenance window on 01 September 2016 14:00 UTC - 20:00 UTC. More information.

Toolset Types
[Plugin: Types - Custom Fields and Custom Post Types Management] Problem with WP_QUERY (3 posts)

  1. christoss1959
    Posted 4 years ago #

    I've been trying use WP_QUERY to show my posts only if typeofgame is equal to 5x5, however the code below doesn't show any posts. Typeofgame is a single line of text. If I remove the meta_query bit it shows all posts.

    $args = array(
    'post_type' => 'post',
    'posts_per_page' => 10,
      'meta_query'=> array(
          'key' => 'wpcf-typeofgame',
          'compare' => '=',
          'value' => '5x5'
    <?php $loop = new WP_Query( $args); ?>


  2. Naz
    Posted 4 years ago #

    I'm not 100% sure this will work, but have you tried using 'typeofgame' instead of 'wpcf-typeofgame'?

  3. christoss1959
    Posted 4 years ago #

    Yeah I've tried it and it doesn't work. I am really buffled by this..

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Toolset Types
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic