query_posts echos a questionmark?
-
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 it
s 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 ShoesWhat
s with the question mark? I'm pretty sure that it has something to do with query_posts, but I
m not explicitly telling it to display anything except the_title();Any ideas?
- The topic ‘query_posts echos a questionmark?’ is closed to new replies.