Querying Custom Post Type 'Products'

Marketpress query:

I have made a custom page template.

Within this template I have made a custom loop to query the custom post type ‘products’.

Why doesn’t this work? Nothing is retrieved at all, not even the wp_title.

Many thanks

  • quango
    • Flash Drive

    Edits to the page are fine, all the template files load as normal (header.php, footer.php etc) It’s just the loop. I’ve been querying other custom post types without a problem using the code below but can’t seem to retrieve marketpress products like this.

    Thanks again.

    <?php
    $yell = new WP_Query(array('post_type' => 'products'));
    while ($yell->have_posts()) : $yell->the_post();
    ?>
    <!-- start post -->
    <div class="post greyimage">

    <?php
    // looking for a featured image
    if (has_post_thumbnail()) { ?>
    <a href="<?php the_permalink() ?>" title="<?php the_title(); ?>" rel="bookmark"><?php the_post_thumbnail('thumbnail'); ?></a>
    <?php } else { ?>
    <a href="<?php the_permalink() ?>" title="<?php the_title(); ?>" rel="bookmark"><img src="<?php bloginfo('template_url'); ?>/images/default-thumbnail.jpg" alt="<?php the_title(); ?>" /></a>
    <?php } ?>

    <div class="index-info">
    <h2><a href="<?php the_permalink() ?>" title="<?php the_title(); ?>" rel="bookmark"><?php the_title(); ?></a></h2>
    <p class="effect-excerpt"><?php the_excerpt() ?></p></div>

    </div>
    <!-- end post -->
    <?php endwhile; ?>

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.