• Resolved vegetable_man

    (@vegetable_man)


    Quick question…

    I’m doing a query_posts on a Page. Basically I’m looking to see if an item is for sale or not. If it is, it should show the product info. Everything is going well except, when it queries my posts, I’m seeing a question mark.

    <!-- Query the Posts -->?
    <?php query_posts(post_type=post); ?>

    <!-- The Loop -->
    <?php while (have_posts()) : the_post(); ?>

    <!-- Get the value of for_sale -->
    <?php $sale = get_field(for_sale); ?>

    <!-- If its for sale, show it! –>`
    <?php if ($sale == "Yes") : ?>

    <p><?php the_title(); ?></p>

    <?php endif; ?>

    <?php endwhile; ?>

    My output consists of:

    ?
    Red Shirt
    Blue Shirt
    Green Pants
    Brown Shoes

    Whats with the question mark? I'm pretty sure that it has something to do with query_posts, but Im not explicitly telling it to display anything except the_title();

    Any ideas?

Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
  • The topic ‘query_posts echos a questionmark?’ is closed to new replies.