• I put together a query that count how many movie I have and then count the number of steelbooks. It was working until I added more about 4 movies then stop working. Can anyone tell what I’m doing wrong.

    The Code:
    <h3 class=”sidetitl “> Movies in Collection </h3>
    <?php
    $count_posts = wp_count_posts(‘movies’);
    echo “<h3>Total Movies in Collection: $count_posts->publish</h3>”;
    ?>
    <?php
    $args = array(
    ‘post_type’ => ‘movies’,
    ‘movie-genre’ => ‘steelbook’
    );
    $query = new WP_Query( $args );
    $count = $query->post_count;
    echo “<h3>Steelbooks in Collection: $count</h3>”;
    ?>
    </div>
    Thanks

The topic ‘Query stop working’ is closed to new replies.